1 /* openat-style fd-relative functions for SE Linux
2 Copyright (C) 2007, 2009-2018 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 */
21 #include "selinux-at.h"
31 #include "openat-priv.h"
33 #define AT_FUNC_NAME getfileconat
34 #define AT_FUNC_F1 getfilecon
35 #define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t *con
36 #define AT_FUNC_POST_FILE_ARGS , con
40 #undef AT_FUNC_POST_FILE_PARAM_DECLS
41 #undef AT_FUNC_POST_FILE_ARGS
43 #define AT_FUNC_NAME lgetfileconat
44 #define AT_FUNC_F1 lgetfilecon
45 #define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t *con
46 #define AT_FUNC_POST_FILE_ARGS , con
50 #undef AT_FUNC_POST_FILE_PARAM_DECLS
51 #undef AT_FUNC_POST_FILE_ARGS
53 #define AT_FUNC_NAME setfileconat
54 #define AT_FUNC_F1 setfilecon
55 #define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t con
56 #define AT_FUNC_POST_FILE_ARGS , con
60 #undef AT_FUNC_POST_FILE_PARAM_DECLS
61 #undef AT_FUNC_POST_FILE_ARGS
63 #define AT_FUNC_NAME lsetfileconat
64 #define AT_FUNC_F1 lsetfilecon
65 #define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t con
66 #define AT_FUNC_POST_FILE_ARGS , con
70 #undef AT_FUNC_POST_FILE_PARAM_DECLS
71 #undef AT_FUNC_POST_FILE_ARGS