Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

drv_priv(9f) [osf1 man page]

drv_priv(9F)						   Kernel Functions for Drivers 					      drv_priv(9F)

NAME
drv_priv - determine driver privilege SYNOPSIS
#include <sys/types.h> #include <sys/cred.h> #include <sys/ddi.h> int drv_priv(cred_t *cr); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
cr Pointer to the user credential structure. DESCRIPTION
drv_priv() provides a general interface to the system privilege policy. It determines whether the credentials supplied by the user creden- tial structure pointed to by cr identify a process that has the {PRIV_SYS_DEVICES} privilege asserted in its effective set. This function should be used only when file access modes, special minor device numbers, and the device policy (see privileges(5), add_drv(1M)) are insuf- ficient to provide protection for the requested driver function. It is intended to replace all calls to suser() and any explicit checks for effective user ID = 0 in driver code. RETURN VALUES
This routine returns 0 if it succeeds, EPERM if it fails. CONTEXT
drv_priv() can be called from user or interrupt context. SEE ALSO
add_drv(1M), update_drv(1M), privileges(5) Writing Device Drivers SunOS 5.10 29 Jan 2003 drv_priv(9F)

Check Out this Related Man Page

drv_priv(9F)						   Kernel Functions for Drivers 					      drv_priv(9F)

NAME
drv_priv - determine driver privilege SYNOPSIS
#include <sys/types.h> #include <sys/cred.h> #include <sys/ddi.h> int drv_priv(cred_t *cr); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
cr Pointer to the user credential structure. DESCRIPTION
drv_priv() provides a general interface to the system privilege policy. It determines whether the credentials supplied by the user creden- tial structure pointed to by cr identify a process that has the {PRIV_SYS_DEVICES} privilege asserted in its effective set. This function should be used only when file access modes, special minor device numbers, and the device policy (see privileges(5), add_drv(1M)) are insuf- ficient to provide protection for the requested driver function. It is intended to replace all calls to suser() and any explicit checks for effective user ID = 0 in driver code. RETURN VALUES
This routine returns 0 if it succeeds, EPERM if it fails. CONTEXT
drv_priv() can be called from user or interrupt context. SEE ALSO
add_drv(1M), update_drv(1M), privileges(5) Writing Device Drivers SunOS 5.10 29 Jan 2003 drv_priv(9F)
Man Page

We Also Found This Discussion For You

1. What is on Your Mind?

Throw my Toys out of the Pram!

Hi Folks, Today hasn't been the best one of my career in IT. I've been a contractor for a major utility company for a number of years, on a number of seperate IT contracts mostly Unix. The company had 10 different flavours of unix and multiple different varsions of most of them. At the... (3 Replies)
Discussion started by: gull04
3 Replies