Import upstream version 1.28
[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-2014 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 #ifndef _GL_INLINE_HEADER_BEGIN
23  #error "Please include config.h first."
24 #endif
25 _GL_INLINE_HEADER_BEGIN
26 #ifndef PRIV_SET_INLINE
27 # define PRIV_SET_INLINE _GL_INLINE
28 #endif
29
30 #if HAVE_GETPPRIV && HAVE_PRIV_H
31
32 # include <priv.h>
33
34 int priv_set_ismember (const char *priv);
35 int priv_set_remove (const char *priv);
36 int priv_set_restore (const char *priv);
37
38 PRIV_SET_INLINE int
39 priv_set_remove_linkdir (void)
40 {
41   return priv_set_remove (PRIV_SYS_LINKDIR);
42 }
43
44 PRIV_SET_INLINE int
45 priv_set_restore_linkdir (void)
46 {
47   return priv_set_restore (PRIV_SYS_LINKDIR);
48 }
49
50 #else
51
52 PRIV_SET_INLINE int
53 priv_set_remove_linkdir (void)
54 {
55   return -1;
56 }
57
58 PRIV_SET_INLINE int
59 priv_set_restore_linkdir (void)
60 {
61   return -1;
62 }
63
64 #endif
65
66 _GL_INLINE_HEADER_END