Line data Source code
1 : #ifndef SELINUX_CONTEXT_H
2 : # define SELINUX_CONTEXT_H
3 :
4 : # include <errno.h>
5 : /* Some systems don't have ENOTSUP. */
6 : # ifndef ENOTSUP
7 : # ifdef ENOSYS
8 : # define ENOTSUP ENOSYS
9 : # else
10 : /* Some systems don't have ENOSYS either. */
11 : # define ENOTSUP EINVAL
12 : # endif
13 : # endif
14 :
15 : typedef int context_t;
16 16 : static inline context_t context_new (char const *s)
17 16 : { errno = ENOTSUP; return 0; }
18 0 : static inline char *context_str (context_t con)
19 0 : { errno = ENOTSUP; return (void *) 0; }
20 0 : static inline void context_free (context_t c) {}
21 :
22 0 : static inline int context_user_set (context_t sc, char const *s)
23 0 : { errno = ENOTSUP; return -1; }
24 0 : static inline int context_role_set (context_t sc, char const *s)
25 0 : { errno = ENOTSUP; return -1; }
26 0 : static inline int context_range_set (context_t sc, char const *s)
27 0 : { errno = ENOTSUP; return -1; }
28 0 : static inline int context_type_set (context_t sc, char const *s)
29 0 : { errno = ENOTSUP; return -1; }
30 :
31 : #endif
|