|
Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!
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
The drv_priv() function provides a general interface to the
system privilege policy. It determines whether the creden-
tials 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 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
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
SunOS 5.10 Last change: 16 Jan 2006 1
Man(1) output converted with
man2html and wrapped by fishsponge
This page was generated on Wed Sep 12 11:29:03 GMT 2007
|
Your favourite pages:
No pages logged yet. Trying to save cookie... Top 10 most popular pages:
svn man page (5406 hits) (FreeBSD 6.2)
sqlite3 man page (5401 hits) (openSUSE 10.2)
adv_cap_autoneg man page (4903 hits) (Solaris 10 11_06)
CPAN man page (4638 hits) (Suse Linux 10.1)
ssh man page (4358 hits) (Suse Linux 10.1)
ssh-socks5-proxy-connect man page (3030 hits) (Solaris 10 11_06)
netcat man page (2836 hits) (Suse Linux 10.1)
signal man page (2742 hits) (Suse Linux 10.1)
pprosetup man page (2532 hits) (Solaris 10 11_06)
startproc man page (2527 hits) (Suse Linux 10.1)
|