gnulib-common: prefer _GL_UNUSED over _UNUSED_PARAMETER_
[gnulib.git] / lib / se-selinux.in.h
1 #ifndef _GL_SELINUX_SELINUX_H
2 # define _GL_SELINUX_SELINUX_H
3
4 # if __GNUC__ >= 3
5 @PRAGMA_SYSTEM_HEADER@
6 # endif
7
8 # if HAVE_SELINUX_SELINUX_H
9
10 #@INCLUDE_NEXT@ @NEXT_SELINUX_SELINUX_H@
11
12 # else
13
14 #  include <sys/types.h>
15 #  include <errno.h>
16
17 typedef unsigned short security_class_t;
18 #  define security_context_t char*
19 #  define is_selinux_enabled() 0
20
21 static inline int getcon (security_context_t *con _GL_UNUSED)
22   { errno = ENOTSUP; return -1; }
23 static inline void freecon (security_context_t con _GL_UNUSED) {}
24
25
26 static inline int getfscreatecon (security_context_t *con _GL_UNUSED)
27   { errno = ENOTSUP; return -1; }
28 static inline int setfscreatecon (security_context_t con _GL_UNUSED)
29   { errno = ENOTSUP; return -1; }
30 static inline int matchpathcon (char const *file _GL_UNUSED,
31                                 mode_t m _GL_UNUSED,
32                                 security_context_t *con _GL_UNUSED)
33   { errno = ENOTSUP; return -1; }
34 static inline int getfilecon (char const *file _GL_UNUSED,
35                               security_context_t *con _GL_UNUSED)
36   { errno = ENOTSUP; return -1; }
37 static inline int lgetfilecon (char const *file _GL_UNUSED,
38                                security_context_t *con _GL_UNUSED)
39   { errno = ENOTSUP; return -1; }
40 static inline int fgetfilecon (int fd,
41                                security_context_t *con _GL_UNUSED)
42   { errno = ENOTSUP; return -1; }
43 static inline int setfilecon (char const *file _GL_UNUSED,
44                               security_context_t con _GL_UNUSED)
45   { errno = ENOTSUP; return -1; }
46 static inline int lsetfilecon (char const *file _GL_UNUSED,
47                                security_context_t con _GL_UNUSED)
48   { errno = ENOTSUP; return -1; }
49 static inline int fsetfilecon (int fd _GL_UNUSED,
50                                security_context_t con _GL_UNUSED)
51   { errno = ENOTSUP; return -1; }
52
53 static inline int security_check_context
54     (security_context_t con _GL_UNUSED)
55   { errno = ENOTSUP; return -1; }
56 static inline int security_check_context_raw
57     (security_context_t con _GL_UNUSED)
58   { errno = ENOTSUP; return -1; }
59 static inline int setexeccon (security_context_t con _GL_UNUSED)
60   { errno = ENOTSUP; return -1; }
61 static inline int security_compute_create
62     (security_context_t scon _GL_UNUSED,
63      security_context_t tcon _GL_UNUSED,
64      security_class_t tclass _GL_UNUSED,
65      security_context_t *newcon _GL_UNUSED)
66   { errno = ENOTSUP; return -1; }
67 static inline int matchpathcon_init_prefix
68     (char const *path _GL_UNUSED,
69      char const *prefix _GL_UNUSED)
70   { errno = ENOTSUP; return -1; }
71
72 # endif
73 #endif /* _GL_SELINUX_SELINUX_H */