PRIV_GETBYNAME(9F) | Kernel Functions for Drivers | PRIV_GETBYNAME(9F) |
#include <sys/cred.h> int priv_getbyname(const char *priv, int flags);
flags
If PRIV_ALLOC is passed as a flag parameter, an attempt is made to allocate a privilege if it is not yet defined. The newly allocated privilege number is returned.
Privilege names can be specified with an optional priv_ prefix, which is stripped.
Privilege names are case insensitive but allocated privileges preserve case.
Allocated privileges can be at most {PRIVNAME_MAX} characters long and can contain only alphanumeric characters and the underscore character.
ENOMEM
ENAMETOOLONG
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Architecture | All |
Interface Stability | Committed |
Writing Device Drivers
March 11, 2004 | OmniOS |