This source file includes following definitions.
- context_new
- context_str
- context_free
- context_user_set
- context_role_set
- context_range_set
- context_type_set
- context_type_get
- context_range_get
- context_role_get
- context_user_get
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #ifndef SELINUX_CONTEXT_H
20 # define SELINUX_CONTEXT_H
21
22 # include <errno.h>
23
24 #ifndef _GL_INLINE_HEADER_BEGIN
25 #error "Please include config.h first."
26 #endif
27 _GL_INLINE_HEADER_BEGIN
28 #ifndef SE_CONTEXT_INLINE
29 # define SE_CONTEXT_INLINE _GL_INLINE
30 #endif
31
32
33
34
35 #ifndef _GL_ATTRIBUTE_MAYBE_UNUSED
36 # if 0
37 # define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
38 # elif defined __GNUC__ || defined __clang__
39 # define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__))
40 # else
41 # define _GL_ATTRIBUTE_MAYBE_UNUSED
42 # endif
43 #endif
44
45 typedef int context_t;
46 SE_CONTEXT_INLINE context_t
47 context_new (_GL_ATTRIBUTE_MAYBE_UNUSED char const *s)
48 { errno = ENOTSUP; return 0; }
49 SE_CONTEXT_INLINE char *
50 context_str (_GL_ATTRIBUTE_MAYBE_UNUSED context_t con)
51 { errno = ENOTSUP; return (void *) 0; }
52 SE_CONTEXT_INLINE void context_free (_GL_ATTRIBUTE_MAYBE_UNUSED context_t c) {}
53
54 SE_CONTEXT_INLINE int
55 context_user_set (_GL_ATTRIBUTE_MAYBE_UNUSED context_t sc,
56 _GL_ATTRIBUTE_MAYBE_UNUSED char const *s)
57 { errno = ENOTSUP; return -1; }
58 SE_CONTEXT_INLINE int
59 context_role_set (_GL_ATTRIBUTE_MAYBE_UNUSED context_t sc,
60 _GL_ATTRIBUTE_MAYBE_UNUSED char const *s)
61 { errno = ENOTSUP; return -1; }
62 SE_CONTEXT_INLINE int
63 context_range_set (_GL_ATTRIBUTE_MAYBE_UNUSED context_t sc,
64 _GL_ATTRIBUTE_MAYBE_UNUSED char const *s)
65 { errno = ENOTSUP; return -1; }
66 SE_CONTEXT_INLINE int
67 context_type_set (_GL_ATTRIBUTE_MAYBE_UNUSED context_t sc,
68 _GL_ATTRIBUTE_MAYBE_UNUSED char const *s)
69 { errno = ENOTSUP; return -1; }
70 SE_CONTEXT_INLINE char *
71 context_type_get (_GL_ATTRIBUTE_MAYBE_UNUSED context_t sc)
72 { errno = ENOTSUP; return (void *) 0; }
73 SE_CONTEXT_INLINE char *
74 context_range_get (_GL_ATTRIBUTE_MAYBE_UNUSED context_t sc)
75 { errno = ENOTSUP; return (void *) 0; }
76 SE_CONTEXT_INLINE char *
77 context_role_get (_GL_ATTRIBUTE_MAYBE_UNUSED context_t sc)
78 { errno = ENOTSUP; return (void *) 0; }
79 SE_CONTEXT_INLINE char *
80 context_user_get (_GL_ATTRIBUTE_MAYBE_UNUSED context_t sc)
81 { errno = ENOTSUP; return (void *) 0; }
82
83 _GL_INLINE_HEADER_END
84
85 #endif