fchmod-tests, fchmodat tests, lchmod tests: Add more tests.
[gnulib.git] / lib / priv-set.h
blob4e192f77305502d75aa6ce5eec8184265234f932
1 /* Query, remove, or restore a Solaris privilege.
3 Copyright (C) 2009-2021 Free Software Foundation, Inc.
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>.
18 Written by David Bartley. */
20 #ifndef _GL_INLINE_HEADER_BEGIN
21 #error "Please include config.h first."
22 #endif
23 _GL_INLINE_HEADER_BEGIN
24 #ifndef PRIV_SET_INLINE
25 # define PRIV_SET_INLINE _GL_INLINE
26 #endif
28 #if HAVE_GETPPRIV && HAVE_PRIV_H
30 # include <priv.h>
32 int priv_set_ismember (const char *priv);
33 int priv_set_remove (const char *priv);
34 int priv_set_restore (const char *priv);
36 PRIV_SET_INLINE int
37 priv_set_remove_linkdir (void)
39 return priv_set_remove (PRIV_SYS_LINKDIR);
42 PRIV_SET_INLINE int
43 priv_set_restore_linkdir (void)
45 return priv_set_restore (PRIV_SYS_LINKDIR);
48 #else
50 PRIV_SET_INLINE int
51 priv_set_remove_linkdir (void)
53 return -1;
56 PRIV_SET_INLINE int
57 priv_set_restore_linkdir (void)
59 return -1;
62 #endif
64 _GL_INLINE_HEADER_END