drv_priv(9f) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

drv_priv(9f)

drv_priv(9F)                   Kernel Functions                   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  de‐
       vice numbers, and the device policy (see privileges(7), add_drv(8)) 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
       privileges(7), add_drv(8), update_drv(8)


       Writing Device Drivers in Oracle Solaris 11.4

Oracle Solaris 11.4               16 Jan 2006                     drv_priv(9F)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3