Home | History | Annotate | Download | only in lib
      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 
     11 static inline int getcon (security_context_t *con _UNUSED_PARAMETER_)
     12   { errno = ENOTSUP; return -1; }
     13 static inline void freecon (security_context_t con _UNUSED_PARAMETER_) {}
     14 
     15 
     16 static inline int getfscreatecon (security_context_t *con _UNUSED_PARAMETER_)
     17   { errno = ENOTSUP; return -1; }
     18 static inline int setfscreatecon (security_context_t con _UNUSED_PARAMETER_)
     19   { errno = ENOTSUP; return -1; }
     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; }
     24 static inline int getfilecon (char const *s _UNUSED_PARAMETER_,
     25 			      security_context_t *con _UNUSED_PARAMETER_)
     26   { errno = ENOTSUP; return -1; }
     27 static inline int lgetfilecon (char const *s _UNUSED_PARAMETER_,
     28 			       security_context_t *con _UNUSED_PARAMETER_)
     29   { errno = ENOTSUP; return -1; }
     30 static inline int setfilecon (char const *s _UNUSED_PARAMETER_,
     31 			      security_context_t con _UNUSED_PARAMETER_)
     32   { errno = ENOTSUP; return -1; }
     33 static inline int lsetfilecon (char const *s _UNUSED_PARAMETER_,
     34 			       security_context_t con _UNUSED_PARAMETER_)
     35   { errno = ENOTSUP; return -1; }
     36 static inline int fsetfilecon (int fd _UNUSED_PARAMETER_,
     37 			       security_context_t con _UNUSED_PARAMETER_)
     38   { errno = ENOTSUP; return -1; }
     39 
     40 static inline int security_check_context
     41     (security_context_t con _UNUSED_PARAMETER_)
     42   { errno = ENOTSUP; return -1; }
     43 static inline int security_check_context_raw
     44     (security_context_t con _UNUSED_PARAMETER_)
     45   { errno = ENOTSUP; return -1; }
     46 static inline int setexeccon (security_context_t con _UNUSED_PARAMETER_)
     47   { errno = ENOTSUP; return -1; }
     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; }
     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