STREAMS-UX Programmer's Guide (February 2007)

STREAMS Utilities Supported by HP-UX
Appendix B
166
NAME
drv_priv () – Get driver privilege.
SYNOPSIS
#include <sys/stream.h>
int drv_priv (cred_t * cr);
PARAMETERS
cr
A pointer to a struct cred_t.
DESCRIPTION
Determine if the user has the correct credentials to perform a function.
RETURN VALUES
drv_priv() returns 0 if the caller has super user privilege otherwise EPERM.
CONSTRAINTS
drv_priv() can be called from thread or interrupt context. Spinlocks can be held across this call.