priv_lower Subroutine

Purpose

Removes the privilege from the effective privilege set of the calling process.

Library

Security Library (libc.a)

Syntax

#include <userpriv.h>
#include <sys/priv.h>

int priv_lower (int priv1, ...)

Description

The priv_lower subroutine removes each of the privileges in the comma separated privilege list from the effective privilege set 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>. The maximum privilege set, limiting privilege set, and other privileges in the effective privilege set are not affected.

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