1 /* SELinux-related headers.
2 Copyright (C) 2007-2020 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17 /* Written by Jim Meyering, 2007. */
19 #ifndef SELINUX_CONTEXT_H
20 # define SELINUX_CONTEXT_H
24 #ifndef _GL_INLINE_HEADER_BEGIN
25 #error "Please include config.h first."
27 _GL_INLINE_HEADER_BEGIN
28 #ifndef SE_CONTEXT_INLINE
29 # define SE_CONTEXT_INLINE _GL_INLINE
32 /* The definition of _GL_UNUSED_PARAMETER is copied here. */
34 typedef int context_t
;
35 SE_CONTEXT_INLINE context_t
context_new (char const *s _GL_UNUSED_PARAMETER
)
36 { errno
= ENOTSUP
; return 0; }
37 SE_CONTEXT_INLINE
char *context_str (context_t con _GL_UNUSED_PARAMETER
)
38 { errno
= ENOTSUP
; return (void *) 0; }
39 SE_CONTEXT_INLINE
void context_free (context_t c _GL_UNUSED_PARAMETER
) {}
41 SE_CONTEXT_INLINE
int context_user_set (context_t sc _GL_UNUSED_PARAMETER
,
42 char const *s _GL_UNUSED_PARAMETER
)
43 { errno
= ENOTSUP
; return -1; }
44 SE_CONTEXT_INLINE
int context_role_set (context_t sc _GL_UNUSED_PARAMETER
,
45 char const *s _GL_UNUSED_PARAMETER
)
46 { errno
= ENOTSUP
; return -1; }
47 SE_CONTEXT_INLINE
int context_range_set (context_t sc _GL_UNUSED_PARAMETER
,
48 char const *s _GL_UNUSED_PARAMETER
)
49 { errno
= ENOTSUP
; return -1; }
50 SE_CONTEXT_INLINE
int context_type_set (context_t sc _GL_UNUSED_PARAMETER
,
51 char const *s _GL_UNUSED_PARAMETER
)
52 { errno
= ENOTSUP
; return -1; }
53 SE_CONTEXT_INLINE
char *context_type_get (context_t sc _GL_UNUSED_PARAMETER
)
54 { errno
= ENOTSUP
; return (void *) 0; }
55 SE_CONTEXT_INLINE
char *context_range_get (context_t sc _GL_UNUSED_PARAMETER
)
56 { errno
= ENOTSUP
; return (void *) 0; }
57 SE_CONTEXT_INLINE
char *context_role_get (context_t sc _GL_UNUSED_PARAMETER
)
58 { errno
= ENOTSUP
; return (void *) 0; }
59 SE_CONTEXT_INLINE
char *context_user_get (context_t sc _GL_UNUSED_PARAMETER
)
60 { errno
= ENOTSUP
; return (void *) 0; }