diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-01-20 10:55:18 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-01-20 10:55:18 +0000 |
commit | 70e9163c9c18e995515598085cb824e554eb7ae7 (patch) | |
tree | a42dc8b2a6c031354bf31472de888bfc8a060132 /lib/priv-set.h | |
parent | cbf5993c43f49281173f185863577d86bfac6eae (diff) | |
download | coreutils-tarball-master.tar.gz |
coreutils-8.25HEADcoreutils-8.25master
Diffstat (limited to 'lib/priv-set.h')
-rw-r--r-- | lib/priv-set.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/lib/priv-set.h b/lib/priv-set.h new file mode 100644 index 0000000..b656f73 --- /dev/null +++ b/lib/priv-set.h @@ -0,0 +1,64 @@ +/* Query, remove, or restore a Solaris privilege. + + Copyright (C) 2009-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + + Written by David Bartley. */ + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef PRIV_SET_INLINE +# define PRIV_SET_INLINE _GL_INLINE +#endif + +#if HAVE_GETPPRIV && HAVE_PRIV_H + +# include <priv.h> + +int priv_set_ismember (const char *priv); +int priv_set_remove (const char *priv); +int priv_set_restore (const char *priv); + +PRIV_SET_INLINE int +priv_set_remove_linkdir (void) +{ + return priv_set_remove (PRIV_SYS_LINKDIR); +} + +PRIV_SET_INLINE int +priv_set_restore_linkdir (void) +{ + return priv_set_restore (PRIV_SYS_LINKDIR); +} + +#else + +PRIV_SET_INLINE int +priv_set_remove_linkdir (void) +{ + return -1; +} + +PRIV_SET_INLINE int +priv_set_restore_linkdir (void) +{ + return -1; +} + +#endif + +_GL_INLINE_HEADER_END |