These library routines get process privilege sets, convert a privilege ID or privilege set between binary and text, and get the privilege description text for a specified privilege ID.
These library routines set the effective, permitted, and inheritable privilege sets on a process. Refer to the set_effective_priv(3TSOL) man page.
int set_effective_priv(priv_op_t op, int privno, priv_t priv_id); int set_permitted_priv(priv_op_t op, int privno, priv_t priv_id); int set_inheritable_priv(priv_op_t op, int privno, priv_t priv_id);
You can also use setppriv(2) and getppriv(2) to access process privilege sets. The syntax is a little different, but the semantics are the same.
These library routines translate a privilege ID or a privilege set between binary and text. Refer to the priv_to_str(3TSOL) man page.
char* priv_to_str(const priv_t priv_id); priv_t str_to_priv(const char *priv_name); char* priv_set_to_str(priv_set_t *priv_set, const char sep, char *buf, int *blen); char* str_to_priv_set(const char *priv_names, priv_set_t *priv_set, const char *sep);
These library routines get the privilege text for a specified privilege ID. Refer to the priv_to_str(3TSOL) man page.
char* get_priv_text(const priv_t priv_id);