1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2 /* Replacement <selinux/selinux.h> for platforms that lack it.
3    Copyright (C) 2008-2021 Free Software Foundation, Inc.
4 
5    This program is free software: you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; either version 3 of the License, or
8    (at your option) any later version.
9 
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13    GNU General Public License for more details.
14 
15    You should have received a copy of the GNU General Public License
16    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
17 
18 #if __GNUC__ >= 3
19 #pragma GCC system_header
20 #endif
21 
22 
23 #if HAVE_SELINUX_SELINUX_H
24 
25 #include_next
26 
27 #else
28 # if !defined _GL_SELINUX_SELINUX_H
29 #  define _GL_SELINUX_SELINUX_H
30 
31 #  include <sys/types.h>
32 #  include <errno.h>
33 
34 #  ifndef _GL_INLINE_HEADER_BEGIN
35     #error "Please include config.h first."
36 #  endif
37 _GL_INLINE_HEADER_BEGIN
38 #  ifndef SE_SELINUX_INLINE
39 #   define SE_SELINUX_INLINE _GL_INLINE
40 #  endif
41 
42 /* The definition of _GL_UNUSED_PARAMETER is copied here.  */
43 /* A C macro for declaring that specific function parameters are not used.
44    Copyright (C) 2008-2021 Free Software Foundation, Inc.
45 
46    This program is free software: you can redistribute it and/or modify it
47    under the terms of the GNU General Public License as published
48    by the Free Software Foundation; either version 3 of the License, or
49    (at your option) any later version.
50 
51    This program is distributed in the hope that it will be useful,
52    but WITHOUT ANY WARRANTY; without even the implied warranty of
53    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
54    General Public License for more details.
55 
56    You should have received a copy of the GNU General Public License
57    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
58 
59 /* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter
60    declarations for parameters that are not used.  This helps to reduce
61    warnings, such as from GCC -Wunused-parameter.  The syntax is as follows:
62        type param _GL_UNUSED_PARAMETER
63    or more generally
64        param_decl _GL_UNUSED_PARAMETER
65    For example:
66        int param _GL_UNUSED_PARAMETER
67        int *(*param)(void) _GL_UNUSED_PARAMETER
68    Other possible, but obscure and discouraged syntaxes:
69        int _GL_UNUSED_PARAMETER *(*param)(void)
70        _GL_UNUSED_PARAMETER int *(*param)(void)
71  */
72 #ifndef _GL_UNUSED_PARAMETER
73 # define _GL_UNUSED_PARAMETER _GL_ATTRIBUTE_MAYBE_UNUSED
74 #endif
75 
76 #  if !GNULIB_defined_security_types
77 
78 typedef unsigned short security_class_t;
79 struct selinux_opt;
80 #   define is_selinux_enabled() 0
81 
82 SE_SELINUX_INLINE int
getcon(char ** con _GL_UNUSED_PARAMETER)83 getcon (char **con _GL_UNUSED_PARAMETER)
84   { errno = ENOTSUP; return -1; }
85 SE_SELINUX_INLINE void
freecon(char * con _GL_UNUSED_PARAMETER)86 freecon (char *con _GL_UNUSED_PARAMETER) {}
87 
88 SE_SELINUX_INLINE int
getfscreatecon(char ** con _GL_UNUSED_PARAMETER)89 getfscreatecon (char **con _GL_UNUSED_PARAMETER)
90   { errno = ENOTSUP; return -1; }
91 SE_SELINUX_INLINE int
setfscreatecon(char const * con _GL_UNUSED_PARAMETER)92 setfscreatecon (char const *con _GL_UNUSED_PARAMETER)
93   { errno = ENOTSUP; return -1; }
94 SE_SELINUX_INLINE int
matchpathcon(char const * file _GL_UNUSED_PARAMETER,mode_t m _GL_UNUSED_PARAMETER,char ** con _GL_UNUSED_PARAMETER)95 matchpathcon (char const *file _GL_UNUSED_PARAMETER,
96               mode_t m _GL_UNUSED_PARAMETER,
97               char **con _GL_UNUSED_PARAMETER)
98   { errno = ENOTSUP; return -1; }
99 SE_SELINUX_INLINE int
getfilecon(char const * file _GL_UNUSED_PARAMETER,char ** con _GL_UNUSED_PARAMETER)100 getfilecon (char const *file _GL_UNUSED_PARAMETER,
101             char **con _GL_UNUSED_PARAMETER)
102   { errno = ENOTSUP; return -1; }
103 SE_SELINUX_INLINE int
lgetfilecon(char const * file _GL_UNUSED_PARAMETER,char ** con _GL_UNUSED_PARAMETER)104 lgetfilecon (char const *file _GL_UNUSED_PARAMETER,
105              char **con _GL_UNUSED_PARAMETER)
106   { errno = ENOTSUP; return -1; }
107 SE_SELINUX_INLINE int
fgetfilecon(int fd,char ** con _GL_UNUSED_PARAMETER)108 fgetfilecon (int fd, char **con _GL_UNUSED_PARAMETER)
109   { errno = ENOTSUP; return -1; }
110 SE_SELINUX_INLINE int
setfilecon(char const * file _GL_UNUSED_PARAMETER,char const * con _GL_UNUSED_PARAMETER)111 setfilecon (char const *file _GL_UNUSED_PARAMETER,
112             char const *con _GL_UNUSED_PARAMETER)
113   { errno = ENOTSUP; return -1; }
114 SE_SELINUX_INLINE int
lsetfilecon(char const * file _GL_UNUSED_PARAMETER,char const * con _GL_UNUSED_PARAMETER)115 lsetfilecon (char const *file _GL_UNUSED_PARAMETER,
116              char const *con _GL_UNUSED_PARAMETER)
117   { errno = ENOTSUP; return -1; }
118 SE_SELINUX_INLINE int
fsetfilecon(int fd _GL_UNUSED_PARAMETER,char const * con _GL_UNUSED_PARAMETER)119 fsetfilecon (int fd _GL_UNUSED_PARAMETER,
120              char const *con _GL_UNUSED_PARAMETER)
121   { errno = ENOTSUP; return -1; }
122 
123 SE_SELINUX_INLINE int
security_check_context(char const * con _GL_UNUSED_PARAMETER)124 security_check_context (char const *con _GL_UNUSED_PARAMETER)
125   { errno = ENOTSUP; return -1; }
126 SE_SELINUX_INLINE int
security_check_context_raw(char const * con _GL_UNUSED_PARAMETER)127 security_check_context_raw (char const *con _GL_UNUSED_PARAMETER)
128   { errno = ENOTSUP; return -1; }
129 SE_SELINUX_INLINE int
setexeccon(char const * con _GL_UNUSED_PARAMETER)130 setexeccon (char const *con _GL_UNUSED_PARAMETER)
131   { errno = ENOTSUP; return -1; }
132 SE_SELINUX_INLINE int
security_compute_create(char const * scon _GL_UNUSED_PARAMETER,char const * tcon _GL_UNUSED_PARAMETER,security_class_t tclass _GL_UNUSED_PARAMETER,char ** newcon _GL_UNUSED_PARAMETER)133 security_compute_create (char const *scon _GL_UNUSED_PARAMETER,
134                          char const *tcon _GL_UNUSED_PARAMETER,
135                          security_class_t tclass _GL_UNUSED_PARAMETER,
136                          char **newcon _GL_UNUSED_PARAMETER)
137   { errno = ENOTSUP; return -1; }
138 SE_SELINUX_INLINE security_class_t
string_to_security_class(char const * name)139 string_to_security_class (char const *name)
140   { errno = ENOTSUP; return 0; }
141 SE_SELINUX_INLINE int
matchpathcon_init_prefix(char const * path _GL_UNUSED_PARAMETER,char const * prefix _GL_UNUSED_PARAMETER)142 matchpathcon_init_prefix (char const *path _GL_UNUSED_PARAMETER,
143                           char const *prefix _GL_UNUSED_PARAMETER)
144   { errno = ENOTSUP; return -1; }
145 
146 #   define GNULIB_defined_security_types 1
147 #  endif
148 
149 _GL_INLINE_HEADER_END
150 
151 # endif
152 #endif
153