*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> privileged (9r)              
Title
Content
Arch
Section
 

privileged(9r)

Contents


NAME    [Toc]    [Back]

       privileged - General: Checks for proper privileges

SYNOPSIS    [Toc]    [Back]

       int privileged(
               int privilege,
               int error_code );

ARGUMENTS    [Toc]    [Back]

       Specifies  the  privilege to check against. This privilege
       must   be   one    of    the    constants    defined    in
       /usr/sys/include/sys/security.h.  For  example,  you would
       specify SEC_FILESYS for disk drivers that must  manipulate
       partition tables on disk drives.  Specifies the value used
       to control auditing. You can  pass  one  of  the  system's
       error  codes or one of the following values: -1, 0, 1.  An
       example of an error code is the constant EPERM.

DESCRIPTION    [Toc]    [Back]

       The privileged routine checks for an appropriate privilege
       when the security feature is enabled.  Use privileged with
       a privilege number and with the error_code argument set to
       the  constant EPERM to emulate the traditional behavior of
       the suser routine. Set error_code to a value of  0  (zero)
       if you want to check the privilege but not fail the operation
 if the user does not have  the  proper  privilege.  A
       value of -1 turns off all auditing as well.

RETURN VALUES    [Toc]    [Back]

       The  privileged  routine returns the value 0 (zero) if the
       process does not have privilege. It returns the value 1 if
       the process does have privilege.

FILES    [Toc]    [Back]

SEE ALSO
       Routines: suser(9r)



                                                   privileged(9r)
[ Back ]
 Similar pages
Name OS Title
suser Tru64 General: Checks whether the current user is the superuser
split IRIX Split a string into a proper Tcl list
setprivgrp HP-UX set special privileges for groups
defaultPrivileges IRIX default system administration privileges
initprivs Tru64 Initializes privileges (Enhanced Security)
addprivuser IRIX give a user all system administration privileges
fakeroot Linux run a command in an environment faking root privileges for file manipulation
_sia_isagroup Tru64 checks a list of known
__sia_isagroup Tru64 checks a list of known
acl_valid Tru64 Checks an ACL for validity
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service