• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef SELINUX_SELINUX_H
2 # define SELINUX_SELINUX_H
3 
4 # include <sys/types.h>
5 # include <errno.h>
6 
7 typedef unsigned short security_class_t;
8 # define security_context_t char*
9 # define is_selinux_enabled() 0
10 
getcon(security_context_t * con _UNUSED_PARAMETER_)11 static inline int getcon (security_context_t *con _UNUSED_PARAMETER_)
12   { errno = ENOTSUP; return -1; }
freecon(security_context_t con _UNUSED_PARAMETER_)13 static inline void freecon (security_context_t con _UNUSED_PARAMETER_) {}
14 
15 
getfscreatecon(security_context_t * con _UNUSED_PARAMETER_)16 static inline int getfscreatecon (security_context_t *con _UNUSED_PARAMETER_)
17   { errno = ENOTSUP; return -1; }
setfscreatecon(security_context_t con _UNUSED_PARAMETER_)18 static inline int setfscreatecon (security_context_t con _UNUSED_PARAMETER_)
19   { errno = ENOTSUP; return -1; }
matchpathcon(char const * s _UNUSED_PARAMETER_,mode_t m _UNUSED_PARAMETER_,security_context_t * con _UNUSED_PARAMETER_)20 static inline int matchpathcon (char const *s _UNUSED_PARAMETER_,
21 				mode_t m _UNUSED_PARAMETER_,
22 				security_context_t *con _UNUSED_PARAMETER_)
23   { errno = ENOTSUP; return -1; }
getfilecon(char const * s _UNUSED_PARAMETER_,security_context_t * con _UNUSED_PARAMETER_)24 static inline int getfilecon (char const *s _UNUSED_PARAMETER_,
25 			      security_context_t *con _UNUSED_PARAMETER_)
26   { errno = ENOTSUP; return -1; }
lgetfilecon(char const * s _UNUSED_PARAMETER_,security_context_t * con _UNUSED_PARAMETER_)27 static inline int lgetfilecon (char const *s _UNUSED_PARAMETER_,
28 			       security_context_t *con _UNUSED_PARAMETER_)
29   { errno = ENOTSUP; return -1; }
setfilecon(char const * s _UNUSED_PARAMETER_,security_context_t con _UNUSED_PARAMETER_)30 static inline int setfilecon (char const *s _UNUSED_PARAMETER_,
31 			      security_context_t con _UNUSED_PARAMETER_)
32   { errno = ENOTSUP; return -1; }
lsetfilecon(char const * s _UNUSED_PARAMETER_,security_context_t con _UNUSED_PARAMETER_)33 static inline int lsetfilecon (char const *s _UNUSED_PARAMETER_,
34 			       security_context_t con _UNUSED_PARAMETER_)
35   { errno = ENOTSUP; return -1; }
fsetfilecon(int fd _UNUSED_PARAMETER_,security_context_t con _UNUSED_PARAMETER_)36 static inline int fsetfilecon (int fd _UNUSED_PARAMETER_,
37 			       security_context_t con _UNUSED_PARAMETER_)
38   { errno = ENOTSUP; return -1; }
39 
security_check_context(security_context_t con _UNUSED_PARAMETER_)40 static inline int security_check_context
41     (security_context_t con _UNUSED_PARAMETER_)
42   { errno = ENOTSUP; return -1; }
security_check_context_raw(security_context_t con _UNUSED_PARAMETER_)43 static inline int security_check_context_raw
44     (security_context_t con _UNUSED_PARAMETER_)
45   { errno = ENOTSUP; return -1; }
setexeccon(security_context_t con _UNUSED_PARAMETER_)46 static inline int setexeccon (security_context_t con _UNUSED_PARAMETER_)
47   { errno = ENOTSUP; return -1; }
security_compute_create(security_context_t scon _UNUSED_PARAMETER_,security_context_t tcon _UNUSED_PARAMETER_,security_class_t tclass _UNUSED_PARAMETER_,security_context_t * newcon _UNUSED_PARAMETER_)48 static inline int security_compute_create
49     (security_context_t scon _UNUSED_PARAMETER_,
50      security_context_t tcon _UNUSED_PARAMETER_,
51      security_class_t tclass _UNUSED_PARAMETER_,
52      security_context_t *newcon _UNUSED_PARAMETER_)
53   { errno = ENOTSUP; return -1; }
matchpathcon_init_prefix(char const * path _UNUSED_PARAMETER_,char const * prefix _UNUSED_PARAMETER_)54 static inline int matchpathcon_init_prefix
55     (char const *path _UNUSED_PARAMETER_,
56      char const *prefix _UNUSED_PARAMETER_)
57   { errno = ENOTSUP; return -1; }
58 #endif
59