suser Kernel Service
Purpose
Determines the privilege state of a process.
Syntax
#include <sys/types.h>
#include <sys/errno.h>
int suser ( ep)
char *ep;
char *ep;
Parameter
Item | Description |
---|---|
ep | Points to a character variable where the EPERM value is stored on failure. |
Description
The suser kernel service checks whether a process has any effective privilege (that is, whether the process's uid field equals 0).
Execution Environment
The suser kernel service can be called from the process environment only.
Return Values
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). |