annotate lib/se-selinux.in.h @ 17480:f40b3156a43e

selinux-at: omit unnecessary include * lib/selinux-at.c: Don't include dosname.h; not needed, since this source file doesn't use its macros, and subsidiary files that use the macros already include it.
author Paul Eggert <eggert@cs.ucla.edu>
date Fri, 23 Aug 2013 13:53:46 -0700
parents e542fd46ad6f
children 1f9070ef79b0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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.
17249
e542fd46ad6f maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents: 17170
diff changeset
2 Copyright (C) 2008-2013 Free Software Foundation, Inc.
13055
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
14840
5f709022a256 Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents: 14274
diff changeset
17 #ifndef _@GUARD_PREFIX@_SELINUX_SELINUX_H
5f709022a256 Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents: 14274
diff changeset
18 # define _@GUARD_PREFIX@_SELINUX_SELINUX_H
12143
d1f84df3a7a4 selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents: 10702
diff changeset
19
13094
2ed0fc659db8 Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents: 13055
diff changeset
20 # if __GNUC__ >= 3
2ed0fc659db8 Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents: 13055
diff changeset
21 @PRAGMA_SYSTEM_HEADER@
2ed0fc659db8 Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents: 13055
diff changeset
22 # endif
13761
a19ace3ba849 Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents: 13094
diff changeset
23 @PRAGMA_COLUMNS@
13094
2ed0fc659db8 Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents: 13055
diff changeset
24
12143
d1f84df3a7a4 selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents: 10702
diff changeset
25 # if HAVE_SELINUX_SELINUX_H
d1f84df3a7a4 selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents: 10702
diff changeset
26
d1f84df3a7a4 selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents: 10702
diff changeset
27 #@INCLUDE_NEXT@ @NEXT_SELINUX_SELINUX_H@
d1f84df3a7a4 selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents: 10702
diff changeset
28
d1f84df3a7a4 selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents: 10702
diff changeset
29 # else
d1f84df3a7a4 selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents: 10702
diff changeset
30
d1f84df3a7a4 selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents: 10702
diff changeset
31 # include <sys/types.h>
d1f84df3a7a4 selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents: 10702
diff changeset
32 # include <errno.h>
10694
b2b4c17db720 selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
33
17170
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
34 _GL_INLINE_HEADER_BEGIN
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
35 # ifndef SE_SELINUX_INLINE
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
36 # define SE_SELINUX_INLINE _GL_INLINE
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
37 # endif
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
38
12503
92194f05b35f selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents: 12482
diff changeset
39 /* 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
40
14274
da5595160b9f Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
41 # if !GNULIB_defined_security_types
da5595160b9f Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
42
10694
b2b4c17db720 selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
43 typedef unsigned short security_class_t;
14274
da5595160b9f Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
44 # define security_context_t char*
da5595160b9f Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
45 # define is_selinux_enabled() 0
10694
b2b4c17db720 selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
46
17170
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
47 SE_SELINUX_INLINE int
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
48 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
49 { errno = ENOTSUP; return -1; }
17170
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
50 SE_SELINUX_INLINE void
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
51 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
52
17170
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
53 SE_SELINUX_INLINE int
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
54 getfscreatecon (security_context_t *con _GL_UNUSED_PARAMETER)
10694
b2b4c17db720 selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
55 { errno = ENOTSUP; return -1; }
17170
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
56 SE_SELINUX_INLINE int
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
57 setfscreatecon (security_context_t con _GL_UNUSED_PARAMETER)
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
58 { errno = ENOTSUP; return -1; }
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
59 SE_SELINUX_INLINE int
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
60 matchpathcon (char const *file _GL_UNUSED_PARAMETER,
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
61 mode_t m _GL_UNUSED_PARAMETER,
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
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; }
17170
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
64 SE_SELINUX_INLINE int
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
65 getfilecon (char const *file _GL_UNUSED_PARAMETER,
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
66 security_context_t *con _GL_UNUSED_PARAMETER)
10694
b2b4c17db720 selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
67 { errno = ENOTSUP; return -1; }
17170
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
68 SE_SELINUX_INLINE int
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
69 lgetfilecon (char const *file _GL_UNUSED_PARAMETER,
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
70 security_context_t *con _GL_UNUSED_PARAMETER)
10694
b2b4c17db720 selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
71 { errno = ENOTSUP; return -1; }
17170
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
72 SE_SELINUX_INLINE int
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
73 fgetfilecon (int fd, security_context_t *con _GL_UNUSED_PARAMETER)
12143
d1f84df3a7a4 selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents: 10702
diff changeset
74 { errno = ENOTSUP; return -1; }
17170
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
75 SE_SELINUX_INLINE int
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
76 setfilecon (char const *file _GL_UNUSED_PARAMETER,
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
77 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; }
17170
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
79 SE_SELINUX_INLINE int
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
80 lsetfilecon (char const *file _GL_UNUSED_PARAMETER,
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
81 security_context_t con _GL_UNUSED_PARAMETER)
10694
b2b4c17db720 selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
82 { errno = ENOTSUP; return -1; }
17170
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
83 SE_SELINUX_INLINE int
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
84 fsetfilecon (int fd _GL_UNUSED_PARAMETER,
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
85 security_context_t con _GL_UNUSED_PARAMETER)
10694
b2b4c17db720 selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
86 { errno = ENOTSUP; return -1; }
b2b4c17db720 selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
87
17170
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
88 SE_SELINUX_INLINE int
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
89 security_check_context (security_context_t con _GL_UNUSED_PARAMETER)
10694
b2b4c17db720 selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
90 { errno = ENOTSUP; return -1; }
17170
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
91 SE_SELINUX_INLINE int
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
92 security_check_context_raw (security_context_t con _GL_UNUSED_PARAMETER)
10694
b2b4c17db720 selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
93 { errno = ENOTSUP; return -1; }
17170
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
94 SE_SELINUX_INLINE int
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
95 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
96 { errno = ENOTSUP; return -1; }
17170
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
97 SE_SELINUX_INLINE int
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
98 security_compute_create (security_context_t scon _GL_UNUSED_PARAMETER,
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
99 security_context_t tcon _GL_UNUSED_PARAMETER,
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
100 security_class_t tclass _GL_UNUSED_PARAMETER,
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
101 security_context_t *newcon _GL_UNUSED_PARAMETER)
10694
b2b4c17db720 selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
102 { errno = ENOTSUP; return -1; }
17170
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
103 SE_SELINUX_INLINE int
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
104 matchpathcon_init_prefix (char const *path _GL_UNUSED_PARAMETER,
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
105 char const *prefix _GL_UNUSED_PARAMETER)
10694
b2b4c17db720 selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff changeset
106 { errno = ENOTSUP; return -1; }
12143
d1f84df3a7a4 selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents: 10702
diff changeset
107
14274
da5595160b9f Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
108 # define GNULIB_defined_security_types 1
da5595160b9f Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
109 # endif
da5595160b9f Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
110
17170
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
111 _GL_INLINE_HEADER_BEGIN
661d79eb6d77 selinux-h: better 'inline'
Paul Eggert <eggert@cs.ucla.edu>
parents: 16201
diff changeset
112
12143
d1f84df3a7a4 selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents: 10702
diff changeset
113 # endif
14840
5f709022a256 Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents: 14274
diff changeset
114 #endif /* _@GUARD_PREFIX@_SELINUX_SELINUX_H */