Import upstream version 1.28
[debian/tar] / gnu / se-selinux.in.h
1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* Replacement <selinux/selinux.h> for platforms that lack it.
4    Copyright (C) 2008-2014 Free Software Foundation, Inc.
5
6    This program is free software: you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 3 of the License, or
9    (at your option) any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
18
19 #ifndef _@GUARD_PREFIX@_SELINUX_SELINUX_H
20 # define _@GUARD_PREFIX@_SELINUX_SELINUX_H
21
22 # if __GNUC__ >= 3
23 @PRAGMA_SYSTEM_HEADER@
24 # endif
25 @PRAGMA_COLUMNS@
26
27 # if HAVE_SELINUX_SELINUX_H
28
29 #@INCLUDE_NEXT@ @NEXT_SELINUX_SELINUX_H@
30
31 # else
32
33 #  include <sys/types.h>
34 #  include <errno.h>
35
36 #ifndef _GL_INLINE_HEADER_BEGIN
37  #error "Please include config.h first."
38 #endif
39 _GL_INLINE_HEADER_BEGIN
40 #  ifndef SE_SELINUX_INLINE
41 #   define SE_SELINUX_INLINE _GL_INLINE
42 #  endif
43
44 /* The definition of _GL_UNUSED_PARAMETER is copied here.  */
45
46 #  if !GNULIB_defined_security_types
47
48 typedef unsigned short security_class_t;
49 typedef char *security_context_t;
50 #   define is_selinux_enabled() 0
51
52 SE_SELINUX_INLINE int
53 getcon (security_context_t *con _GL_UNUSED_PARAMETER)
54   { errno = ENOTSUP; return -1; }
55 SE_SELINUX_INLINE void
56 freecon (security_context_t con _GL_UNUSED_PARAMETER) {}
57
58 SE_SELINUX_INLINE int
59 getfscreatecon (security_context_t *con _GL_UNUSED_PARAMETER)
60   { errno = ENOTSUP; return -1; }
61 SE_SELINUX_INLINE int
62 setfscreatecon (security_context_t con _GL_UNUSED_PARAMETER)
63   { errno = ENOTSUP; return -1; }
64 SE_SELINUX_INLINE int
65 matchpathcon (char const *file _GL_UNUSED_PARAMETER,
66               mode_t m _GL_UNUSED_PARAMETER,
67   security_context_t *con _GL_UNUSED_PARAMETER)
68   { errno = ENOTSUP; return -1; }
69 SE_SELINUX_INLINE int
70 getfilecon (char const *file _GL_UNUSED_PARAMETER,
71             security_context_t *con _GL_UNUSED_PARAMETER)
72   { errno = ENOTSUP; return -1; }
73 SE_SELINUX_INLINE int
74 lgetfilecon (char const *file _GL_UNUSED_PARAMETER,
75              security_context_t *con _GL_UNUSED_PARAMETER)
76   { errno = ENOTSUP; return -1; }
77 SE_SELINUX_INLINE int
78 fgetfilecon (int fd, security_context_t *con _GL_UNUSED_PARAMETER)
79   { errno = ENOTSUP; return -1; }
80 SE_SELINUX_INLINE int
81 setfilecon (char const *file _GL_UNUSED_PARAMETER,
82             security_context_t con _GL_UNUSED_PARAMETER)
83   { errno = ENOTSUP; return -1; }
84 SE_SELINUX_INLINE int
85 lsetfilecon (char const *file _GL_UNUSED_PARAMETER,
86              security_context_t con _GL_UNUSED_PARAMETER)
87   { errno = ENOTSUP; return -1; }
88 SE_SELINUX_INLINE int
89 fsetfilecon (int fd _GL_UNUSED_PARAMETER,
90              security_context_t con _GL_UNUSED_PARAMETER)
91   { errno = ENOTSUP; return -1; }
92
93 SE_SELINUX_INLINE int
94 security_check_context (security_context_t con _GL_UNUSED_PARAMETER)
95   { errno = ENOTSUP; return -1; }
96 SE_SELINUX_INLINE int
97 security_check_context_raw (security_context_t con _GL_UNUSED_PARAMETER)
98   { errno = ENOTSUP; return -1; }
99 SE_SELINUX_INLINE int
100 setexeccon (security_context_t con _GL_UNUSED_PARAMETER)
101   { errno = ENOTSUP; return -1; }
102 SE_SELINUX_INLINE int
103 security_compute_create (security_context_t scon _GL_UNUSED_PARAMETER,
104                          security_context_t tcon _GL_UNUSED_PARAMETER,
105                          security_class_t tclass _GL_UNUSED_PARAMETER,
106                          security_context_t *newcon _GL_UNUSED_PARAMETER)
107   { errno = ENOTSUP; return -1; }
108 SE_SELINUX_INLINE security_class_t
109 string_to_security_class (char const *name)
110   { errno = ENOTSUP; return 0; }
111 SE_SELINUX_INLINE int
112 matchpathcon_init_prefix (char const *path _GL_UNUSED_PARAMETER,
113                           char const *prefix _GL_UNUSED_PARAMETER)
114   { errno = ENOTSUP; return -1; }
115
116 #   define GNULIB_defined_security_types 1
117 #  endif
118
119 #ifndef _GL_INLINE_HEADER_BEGIN
120  #error "Please include config.h first."
121 #endif
122 _GL_INLINE_HEADER_BEGIN
123
124 # endif
125 #endif /* _@GUARD_PREFIX@_SELINUX_SELINUX_H */