Mercurial > hg > octave-kai > gnulib-hg
annotate lib/se-selinux.in.h @ 13055:c7be8484e434
maint: use pragma consistently across replacement headers
Several headers set #pragma GCC system_header prior to checking
any multiple inclusion guards; maintenance is easiest if all
replacement headers follow the same paradigm.
* lib/ctype.in.h (system_header): Hoist for consistent placement.
* lib/dirent.in.h (system_header): Likewise.
* lib/errno.in.h (system_header): Likewise.
* lib/float.in.h (system_header): Likewise.
* lib/getopt.in.h (system_header): Likewise.
* lib/iconv.in.h (system_header): Likewise.
* lib/inttypes.in.h (system_header): Likewise.
* lib/langinfo.in.h (system_header): Likewise.
* lib/locale.in.h (system_header): Likewise.
* lib/math.in.h (system_header): Likewise.
* lib/netdb.in.h (system_header): Likewise.
* lib/netinet_in.in.h (system_header): Likewise.
* lib/pty.in.h (system_header): Likewise.
* lib/sched.in.h (system_header): Likewise.
* lib/se-selinux.in.h (system_header): Likewise.
* lib/search.in.h (system_header): Likewise.
* lib/spawn.in.h (system_header): Likewise.
* lib/stdarg.in.h (system_header): Likewise.
* lib/stdint.in.h (system_header): Likewise.
* lib/string.in.h (system_header): Likewise.
* lib/strings.in.h (system_header): Likewise.
* lib/sys_file.in.h (system_header): Likewise.
* lib/sys_ioctl.in.h (system_header): Likewise.
* lib/sys_socket.in.h (system_header): Likewise.
* lib/sys_times.in.h (system_header): Likewise.
* lib/sys_utsname.in.h (system_header): Likewise.
* lib/sys_wait.in.h (system_header): Likewise.
* lib/sysexits.in.h (system_header): Likewise.
* lib/unistd.in.h (system_header): Likewise.
* lib/wctype.in.h (system_header): Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
author | Eric Blake <eblake@redhat.com> |
---|---|
date | Thu, 25 Mar 2010 16:28:02 -0600 |
parents | 92194f05b35f |
children | 2ed0fc659db8 |
rev | line source |
---|---|
13055
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
1 /* Replacement <selinux/selinux.h> for platforms that lack it. |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
2 Copyright (C) 2008-2010 Free Software Foundation, Inc. |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
3 |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
4 This program is free software: you can redistribute it and/or modify |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
5 it under the terms of the GNU General Public License as published by |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
6 the Free Software Foundation; either version 3 of the License, or |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
7 (at your option) any later version. |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
8 |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
9 This program is distributed in the hope that it will be useful, |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
10 but WITHOUT ANY WARRANTY; without even the implied warranty of |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
12 GNU General Public License for more details. |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
13 |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
14 You should have received a copy of the GNU General Public License |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
16 |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
17 #if __GNUC__ >= 3 |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
18 @PRAGMA_SYSTEM_HEADER@ |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
19 #endif |
c7be8484e434
maint: use pragma consistently across replacement headers
Eric Blake <eblake@redhat.com>
parents:
12503
diff
changeset
|
20 |
12143
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
21 #ifndef _GL_SELINUX_SELINUX_H |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
22 # define _GL_SELINUX_SELINUX_H |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
23 |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
24 # if HAVE_SELINUX_SELINUX_H |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
25 |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
26 #@INCLUDE_NEXT@ @NEXT_SELINUX_SELINUX_H@ |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
27 |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
28 # else |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
29 |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
30 # include <sys/types.h> |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
31 # include <errno.h> |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
32 |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
33 /* The definition of _GL_UNUSED_PARAMETER is copied here. */ |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
34 |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
35 typedef unsigned short security_class_t; |
12143
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
36 # define security_context_t char* |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
37 # define is_selinux_enabled() 0 |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
38 |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
39 static inline int getcon (security_context_t *con _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
40 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
41 static inline void freecon (security_context_t con _GL_UNUSED_PARAMETER) {} |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
42 |
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
43 |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
44 static inline int getfscreatecon (security_context_t *con _GL_UNUSED_PARAMETER) |
10702
c1444c2ed476
selinux-h: mark parameters of stub functions as intentionally unused
Jim Meyering <jim@meyering.net>
parents:
10695
diff
changeset
|
45 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
46 static inline int setfscreatecon (security_context_t con _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
47 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
48 static inline int matchpathcon (char const *file _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
49 mode_t m _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
50 security_context_t *con _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
51 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
52 static inline int getfilecon (char const *file _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
53 security_context_t *con _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
54 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
55 static inline int lgetfilecon (char const *file _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
56 security_context_t *con _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
57 { errno = ENOTSUP; return -1; } |
12143
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
58 static inline int fgetfilecon (int fd, |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
59 security_context_t *con _GL_UNUSED_PARAMETER) |
12143
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
60 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
61 static inline int setfilecon (char const *file _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
62 security_context_t con _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
63 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
64 static inline int lsetfilecon (char const *file _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
65 security_context_t con _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
66 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
67 static inline int fsetfilecon (int fd _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
68 security_context_t con _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
69 { errno = ENOTSUP; return -1; } |
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
70 |
10702
c1444c2ed476
selinux-h: mark parameters of stub functions as intentionally unused
Jim Meyering <jim@meyering.net>
parents:
10695
diff
changeset
|
71 static inline int security_check_context |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
72 (security_context_t con _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
73 { errno = ENOTSUP; return -1; } |
10702
c1444c2ed476
selinux-h: mark parameters of stub functions as intentionally unused
Jim Meyering <jim@meyering.net>
parents:
10695
diff
changeset
|
74 static inline int security_check_context_raw |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
75 (security_context_t con _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
76 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
77 static inline int setexeccon (security_context_t con _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
78 { errno = ENOTSUP; return -1; } |
10702
c1444c2ed476
selinux-h: mark parameters of stub functions as intentionally unused
Jim Meyering <jim@meyering.net>
parents:
10695
diff
changeset
|
79 static inline int security_compute_create |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
80 (security_context_t scon _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
81 security_context_t tcon _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
82 security_class_t tclass _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
83 security_context_t *newcon _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
84 { errno = ENOTSUP; return -1; } |
10702
c1444c2ed476
selinux-h: mark parameters of stub functions as intentionally unused
Jim Meyering <jim@meyering.net>
parents:
10695
diff
changeset
|
85 static inline int matchpathcon_init_prefix |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
86 (char const *path _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
87 char const *prefix _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
88 { errno = ENOTSUP; return -1; } |
12143
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
89 |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
90 # endif |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
91 #endif /* _GL_SELINUX_SELINUX_H */ |