maint: update all copyright year number ranges
[gnulib.git] / lib / priv-set.h
1 /* Query, remove, or restore a Solaris privilege.
2
3    Copyright (C) 2009-2012 Free Software Foundation, Inc.
4
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.
9
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.
14
15    You should have received a copy of the GNU General Public License
16    along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18    Written by David Bartley.  */
19
20 #if HAVE_GETPPRIV && HAVE_PRIV_H
21
22 # include <priv.h>
23
24 int priv_set_ismember (const char *priv);
25 int priv_set_remove (const char *priv);
26 int priv_set_restore (const char *priv);
27
28 static inline int priv_set_remove_linkdir (void)
29 {
30   return priv_set_remove (PRIV_SYS_LINKDIR);
31 }
32
33 static inline int priv_set_restore_linkdir (void)
34 {
35   return priv_set_restore (PRIV_SYS_LINKDIR);
36 }
37
38 #else
39
40 static inline int priv_set_remove_linkdir (void)
41 {
42   return -1;
43 }
44
45 static inline int priv_set_restore_linkdir (void)
46 {
47   return -1;
48 }
49
50 #endif