Determines the privilege state of a process.
#include <sys/types.h>
#include <sys/errno.h>
int suser ( ep)
char *ep;
Item | Description |
---|---|
ep | Points to a character variable where the EPERM value is stored on failure. |
The suser kernel service checks whether a process has any effective privilege (that is, whether the process's uid field equals 0).
The suser kernel service can be called from the process environment only.
Item | Description |
---|---|
0 | Indicates failure. The character pointed to by the ep parameter is set to the value of EPERM. This indicates that the calling process does not have any effective privilege. |
Nonzero value | Indicates success (the process has the specified privilege). |