drv_priv man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

DRV_PRIV(9F)							  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
       The  drv_priv()	function  provides  a  general interface to the system
       privilege policy. It determines whether the credentials supplied by the
       user  credential 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  insufficient  to provide protection for the requested driver func‐
       tion. 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
       The  drv_priv()	function can be called from user, interrupt, or kernel
       context.

SEE ALSO
       add_drv(1M), update_drv(1M), privileges(5)

       Writing Device Drivers

				 Jan 16, 2006			  DRV_PRIV(9F)
[top]

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net