privbit_test Subroutine

Purpose

Determines if a privilege belongs to a privilege set.

Library

Security Library (libc.a)

Syntax

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

int privbit_test(privg_t pv, int priv)

Description

The privbit_test subroutine determines whether the privilege specified by the priv parameter is contained within the privilege set specified by the pv parameter.

Parameters

Item Description
pv Specifies the privilege set.
priv Specifies the privilege.

Return Values

The privbit_test subroutine returns one of the following values:

Item Description
0 The value of the priv parameter is not contained within the value of the pv parameter.
1 The value of the priv parameter is contained within the value of the pv parameter.

Errors

No errno value is set.