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

개요

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

priv_policy_only(9f)

priv_policy(9F)                Kernel Functions                priv_policy(9F)



NAME
       priv_policy,  priv_policy_only, priv_policy_choice - check, report, and
       audit privileges

SYNOPSIS
       #include <sys/policy.h>

       int priv_policy(const cred_t *cr, int priv, boolean_t flag,
            int err, const char *msg);


       boolean_t priv_policy_only(const cred_t *cr, int priv,
            boolean_t flag);


       boolean_t priv_policy_choice(const cred_t *cr, int priv,
            boolean_t flag);

INTERFACE LEVEL
       Solaris DDI specific (Solaris DDI).

PARAMETERS
       cr      The credential to be checked.


       priv    The integer value of the privilege to test.


       flag    All zone privileges flag. Set to  B_FALSE  for  most  tests  or
               B_TRUE  if the operation requires the caller to have all avail‐
               able privileges in the zone.


       err     The error code to return.


       msg     String that is added to the privilege debugging message if  one
               is  generated.  NULL  if  no  additional information is needed.
               Because the function name is included in the  output,  NULL  is
               usually the best value to pass as a parameter.


DESCRIPTION
       These functions aid in privilege checking and privilege debugging.


       The  priv_policy(),  priv_policy_only(), and priv_policy_choice() func‐
       tions all check whether priv is asserted in the effective  set  of  the
       credential. The special value PRIV_ALL tests for all privileges.


       The  priv_policy() function updates the ASU accounting flag and records
       the privilege used on success in the audit trail if the required privi‐
       lege was not a basic privilege.


       The  priv_policy_only() function checks whether a privilege is asserted
       and has no side effects.


       The priv_policy_choice() function behaves like  priv_policy_only()  but
       records the successfully used non-basic privileges in the audit trail.

RETURN VALUES
       On success, priv_policy() return 0. On failure it returns its parameter
       err.


       On success, priv_policy_choice() and priv_policy_only()  return  1,  on
       failure both return 0.

ERRORS
       EINVAL          The flags parameter is invalid, the specified privilege
                       does not exist, or the priv parameter contains  invalid
                       characters.


       ENOMEM          There is no room to allocate another privilege.


       ENAMETOOLONG    An  attempt  was  made to allocate a privilege that was
                       longer than {PRIVNAME_MAX} characters.


CONTEXT
       This functions can be called from user, interrupt, or kernel context.

ATTRIBUTES
       See attributes(7) for a description of the following attributes:


       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE VALUE _ Interface StabilityCommitted


SEE ALSO
       acct(3HEAD), attributes(7), privileges(7)


       Writing Device Drivers in Oracle Solaris 11.4



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