44afc8d7d34b219f0eba1c92ad78eb0f97f19ab1
[debian/tar] / gnu / priv-set.h
1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* Query, remove, or restore a Solaris privilege.
4
5    Copyright (C) 2009-2013 Free Software Foundation, Inc.
6
7    This program is free software: you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 3 of the License, or
10    (at your option) any later version.
11
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
20    Written by David Bartley.  */
21
22 _GL_INLINE_HEADER_BEGIN
23 #ifndef PRIV_SET_INLINE
24 # define PRIV_SET_INLINE _GL_INLINE
25 #endif
26
27 #if HAVE_GETPPRIV && HAVE_PRIV_H
28
29 # include <priv.h>
30
31 int priv_set_ismember (const char *priv);
32 int priv_set_remove (const char *priv);
33 int priv_set_restore (const char *priv);
34
35 PRIV_SET_INLINE int
36 priv_set_remove_linkdir (void)
37 {
38   return priv_set_remove (PRIV_SYS_LINKDIR);
39 }
40
41 PRIV_SET_INLINE int
42 priv_set_restore_linkdir (void)
43 {
44   return priv_set_restore (PRIV_SYS_LINKDIR);
45 }
46
47 #else
48
49 PRIV_SET_INLINE int
50 priv_set_remove_linkdir (void)
51 {
52   return -1;
53 }
54
55 PRIV_SET_INLINE int
56 priv_set_restore_linkdir (void)
57 {
58   return -1;
59 }
60
61 #endif
62
63 _GL_INLINE_HEADER_END