Skip Navigation Links | |
Exit Print View | |
man pages section 3: Basic Library Functions Oracle Solaris 11.1 Information Library |
enable_extended_FILE_stdio(3C)
posix_spawnattr_getschedparam(3C)
posix_spawnattr_getschedpolicy(3C)
posix_spawnattr_getsigdefault(3C)
posix_spawnattr_getsigignore_np(3C)
posix_spawnattr_getsigmask(3C)
posix_spawnattr_setschedparam(3C)
posix_spawnattr_setschedpolicy(3C)
posix_spawnattr_setsigdefault(3C)
posix_spawnattr_setsigignore_np(3C)
posix_spawnattr_setsigmask(3C)
posix_spawn_file_actions_addclose(3C)
posix_spawn_file_actions_addclosefrom_np(3C)
posix_spawn_file_actions_adddup2(3C)
posix_spawn_file_actions_addopen(3C)
posix_spawn_file_actions_destroy(3C)
posix_spawn_file_actions_init(3C)
pthread_attr_getdetachstate(3C)
pthread_attr_getinheritsched(3C)
pthread_attr_getschedparam(3C)
pthread_attr_getschedpolicy(3C)
pthread_attr_setdetachstate(3C)
pthread_attr_setinheritsched(3C)
pthread_attr_setschedparam(3C)
pthread_attr_setschedpolicy(3C)
pthread_barrierattr_destroy(3C)
pthread_barrierattr_getpshared(3C)
pthread_barrierattr_setpshared(3C)
pthread_condattr_getpshared(3C)
pthread_condattr_setpshared(3C)
pthread_cond_reltimedwait_np(3C)
pthread_key_create_once_np(3C)
pthread_mutexattr_getprioceiling(3C)
pthread_mutexattr_getprotocol(3C)
pthread_mutexattr_getpshared(3C)
pthread_mutexattr_getrobust(3C)
pthread_mutexattr_setprioceiling(3C)
pthread_mutexattr_setprotocol(3C)
pthread_mutexattr_setpshared(3C)
pthread_mutexattr_setrobust(3C)
pthread_mutex_getprioceiling(3C)
pthread_mutex_reltimedlock_np(3C)
pthread_mutex_setprioceiling(3C)
pthread_rwlockattr_destroy(3C)
pthread_rwlockattr_getpshared(3C)
pthread_rwlockattr_setpshared(3C)
pthread_rwlock_reltimedrdlock_np(3C)
pthread_rwlock_reltimedwrlock_np(3C)
pthread_rwlock_timedrdlock(3C)
pthread_rwlock_timedwrlock(3C)
rctlblk_get_enforced_value(3C)
- privilege set manipulation functions
#include <priv.h> int priv_addset(priv_set_t *sp, const char *priv);
priv_set_t *priv_allocset(void);
void priv_copyset(const priv_set_t *src, priv_set_t *dst);
int priv_delset(priv_set_t *sp, const char *priv);
void priv_emptyset(priv_set_t *sp);
void priv_basicset(priv_set_t *sp);
void priv_fillset(priv_set_t *sp);
void priv_freeset(priv_set_t *sp);
void priv_intersect(const priv_set_t *src, priv_set_t *dst);
void priv_inverse(priv_set_t *sp);
boolean_t priv_isemptyset(const priv_set_t *sp);
boolean_t priv_isequalset(const priv_set_t *src, const priv_set_t *dst);
boolean_t priv_isfullset(const priv_set_t *sp);
boolean_t priv_ismember(const priv_set_t *sp, const char *priv);
boolean_t priv_issubset(const priv_set_t *src, const priv_set_t *dst);
void priv_union(const priv_set_t *src, priv_set_t *dst);
The sp, src, and dst arguments point to privilege sets. The priv argument points to a named privilege.
The priv_addset() function adds the named privilege priv to sp.
The priv_allocset() function allocates sufficient memory to contain a privilege set. The value of the returned privilege set is indeterminate. The function returns NULL and sets errno when it fails to allocate memory.
The priv_copyset() function copies the set src to dst.
The priv_delset() function removes the named privilege priv from sp.
The priv_emptyset() function clears all privileges from sp.
The priv_basicset() function copies the basic privilege set to sp.
The priv_fillset() function asserts all privileges in sp, including the privileges not currently defined in the system.
The priv_freeset() function frees the storage allocated by priv_allocset().
The priv_intersect() function intersects src with dst and places the results in dst.
The priv_inverse() function inverts the privilege set given as argument in place.
The priv_isemptyset() function checks whether the argument is an empty set.
The priv_isequalset() function checks whether the privilege set src is equal to dst.
The priv_isfullset() function checks whether the argument is a full set. A full set is a set with all bits set, regardless of whether the privilege is currently defined in the system.
The priv_ismember() function checks whether the named privilege priv is a member of sp.
The priv_issubset() function checks whether src is a subset of dst.
The priv_union() function takes the union of src and dst and places the result in dst.
Upon successful completion, priv_allocset() returns a pointer to an opaque data structure. It returns NULL if memory allocation fails and sets errno to indicate the error.
Upon successful completion, priv_isemptyset(), priv_isfullset(), priv_isequalset(), priv_issubset(), and priv_ismember() return B_TRUE. Otherwise, they return B_FALSE.
Upon successful completion, priv_delset() and priv_addset() return 0. Otherwise, they return -1 and set errno to indicate the error.
The priv_allocset() function will fail if:
The physical limits of the system are exceeded by the memory allocation needed to hold a privilege set.
There is insufficient memory for allocation to hold a privilege set. The application can try again later.
The priv_delset() and priv_addset() functions will fail if:
The privilege argument is not a valid privilege name.
See attributes(5) for descriptions of the following attributes:
|
setppriv(2), malloc(3C), priv_str_to_set(3C), attributes(5), privileges(5)
The functions that compare sets operate on all bits of the set, regardless of whether the specific privileges are currently defined in the system.