all: prefer https: URLs
[gnulib.git] / lib / selinux-at.c
blobcd4b5f949af153238654d738a5e133f489958c16
1 /* openat-style fd-relative functions for SE Linux
2 Copyright (C) 2007, 2009-2017 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 */
19 #include <config.h>
21 #include "selinux-at.h"
22 #include "openat.h"
24 #include <stdlib.h>
25 #include <unistd.h>
26 #include <errno.h>
27 #include <fcntl.h>
29 #include "save-cwd.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
37 #include "at-func.c"
38 #undef AT_FUNC_NAME
39 #undef AT_FUNC_F1
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
47 #include "at-func.c"
48 #undef AT_FUNC_NAME
49 #undef AT_FUNC_F1
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
57 #include "at-func.c"
58 #undef AT_FUNC_NAME
59 #undef AT_FUNC_F1
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
67 #include "at-func.c"
68 #undef AT_FUNC_NAME
69 #undef AT_FUNC_F1
70 #undef AT_FUNC_POST_FILE_PARAM_DECLS
71 #undef AT_FUNC_POST_FILE_ARGS