getprivid Subroutine

Purpose

Converts a privilege name into a numeric value.

Library

Security Library (libc.a)

Syntax

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

int getprivid(char *privname)

Description

The getprivid subroutine converts a given privilege name specified by the privname parameter into a numeric value of the privilege index that is defined in the <sys/priv.h> header file.

Parameters

Item Description
privname Specifies the privilege name that is in string format.

Return Values

The getprivid subroutine returns one of the following values:
Item Description
privilege index The subroutine successfully completes.
-1 The subroutine cannot find the privilege name specified by the privname parameter.

Errors

No errno value is set.