Query: drv_priv
OS: netbsd
Section: 9f
Links: netbsd man pages all man pages
Forums: unix linux community forum categories
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
drv_priv(9F) Kernel Functions for Drivers drv_priv(9F)NAMEdrv_priv - determine driver privilegeSYNOPSIS#include <sys/types.h> #include <sys/cred.h> #include <sys/ddi.h> int drv_priv(cred_t *cr);INTERFACE LEVELArchitecture independent level 1 (DDI/DKI).PARAMETERScr Pointer to the user credential structure.DESCRIPTIONdrv_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 VALUESThis routine returns 0 if it succeeds, EPERM if it fails.CONTEXTdrv_priv() can be called from user or interrupt context.SEE ALSOadd_drv(1M), update_drv(1M), privileges(5) Writing Device Drivers SunOS 5.10 29 Jan 2003 drv_priv(9F)
Related Man Pages |
---|
drv_priv(9f) - sunos |
drv_priv(9f) - v7 |
drv_priv(9f) - plan9 |
drv_priv(9f) - osx |
drv_priv(9f) - posix |
Similar Topics in the Unix Linux Community |
---|
Vm versus physical linux server |
RFC - Korn shell prompt |
Make bold chars in UNIX |
Adding a List of Times |