priv_remove Subroutine
Purpose
Removes the privilege of the calling process.
Library
Security Library (libc.a)
Syntax
#include <userpriv.h>
#include <sys/priv.h>
int priv_remove(int priv1, ...)
Description
The priv_remove subroutine removes each of the privileges in the comma separated privilege list from the effective and maximum privilege sets of the calling process. The argument list beginning with the priv1 is of the variable length and must be terminated with a negative value. The numeric values of the privileges are defined in the header file <sys/priv.h>. This subroutine does not affect the limiting privilege set, or other privileges in the effective and maximum privilege sets.
The priv_lower, priv_remove, and priv_raise subroutines all call the setppriv subroutine. Thus the calling process of these subroutine is subject to all of the restrictions and privileges imposed by the use of the setppriv subroutine.
Parameters
Item | Description |
---|---|
priv1 | The privilege identified by its number defined in the <sys/priv.h> file. |
Return Values
The priv_remove subroutine returns one of the following values:
Item | Description |
---|---|
0 | The subroutine completes successfully. |
1 | An error has occurred. |
Errors
No errno value is set.