Mercurial > hg > octave-kai > gnulib-hg
annotate lib/se-selinux.in.h @ 12503:92194f05b35f
selinux-h: Make generated .h files standalone.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Fri, 25 Dec 2009 13:51:48 +0100 |
parents | 11bc92a9e2bc |
children | c7be8484e434 |
rev | line source |
---|---|
12143
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
1 #ifndef _GL_SELINUX_SELINUX_H |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
2 # define _GL_SELINUX_SELINUX_H |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
3 |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
4 # if __GNUC__ >= 3 |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
5 @PRAGMA_SYSTEM_HEADER@ |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
6 # endif |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
7 |
12143
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
8 # if HAVE_SELINUX_SELINUX_H |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
9 |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
10 #@INCLUDE_NEXT@ @NEXT_SELINUX_SELINUX_H@ |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
11 |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
12 # else |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
13 |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
14 # include <sys/types.h> |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
15 # include <errno.h> |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
16 |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
17 /* 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
|
18 |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
19 typedef unsigned short security_class_t; |
12143
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
20 # define security_context_t char* |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
21 # define is_selinux_enabled() 0 |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
22 |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
23 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
|
24 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
25 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
|
26 |
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
27 |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
28 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
|
29 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
30 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
|
31 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
32 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
|
33 mode_t m _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
34 security_context_t *con _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
35 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
36 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
|
37 security_context_t *con _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
38 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
39 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
|
40 security_context_t *con _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
41 { errno = ENOTSUP; return -1; } |
12143
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
42 static inline int fgetfilecon (int fd, |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
43 security_context_t *con _GL_UNUSED_PARAMETER) |
12143
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
44 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
45 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
|
46 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 lsetfilecon (char const *file _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
49 security_context_t con _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
50 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
51 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
|
52 security_context_t con _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
53 { errno = ENOTSUP; return -1; } |
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
54 |
10702
c1444c2ed476
selinux-h: mark parameters of stub functions as intentionally unused
Jim Meyering <jim@meyering.net>
parents:
10695
diff
changeset
|
55 static inline int security_check_context |
12503
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; } |
10702
c1444c2ed476
selinux-h: mark parameters of stub functions as intentionally unused
Jim Meyering <jim@meyering.net>
parents:
10695
diff
changeset
|
58 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
|
59 (security_context_t con _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
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 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
|
62 { 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
|
63 static inline int security_compute_create |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
64 (security_context_t scon _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
65 security_context_t tcon _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
66 security_class_t tclass _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
67 security_context_t *newcon _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
68 { 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
|
69 static inline int matchpathcon_init_prefix |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
70 (char const *path _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
71 char const *prefix _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
72 { errno = ENOTSUP; return -1; } |
12143
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
73 |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
74 # endif |
d1f84df3a7a4
selinux-h: always use getfilecon wrappers
Jim Meyering <meyering@redhat.com>
parents:
10702
diff
changeset
|
75 #endif /* _GL_SELINUX_SELINUX_H */ |