[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

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;

Parameter

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

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).

Implementation Specifics

This kernel service is part of Base Operating System (BOS) Runtime.

Related Information

Security Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Home | Search ]