Converts a privilege name into a numeric value.
Security Library (libc.a)
#include <userpriv.h>
#include <sys/priv.h>
int getprivid(char *privname)
The getprivid subroutine converts a given privilege name specified by the privname parameter into a numeric value of the privilege index that is defined in the <sys/priv.h> header file.
| Item | Description |
|---|---|
| privname | Specifies the privilege name that is in string format. |
| Item | Description |
|---|---|
| privilege index | The subroutine successfully completes. |
| -1 | The subroutine cannot find the privilege name specified by the privname parameter. |
No errno value is set.