privileged man page on DigitalUNIX

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

privileged(9r)							privileged(9r)

NAME
       privileged - General: Checks for proper privileges

SYNOPSIS
       int privileged(
	       int privilege,
	       int error_code );

ARGUMENTS
       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  con‐
       stant EPERM.

DESCRIPTION
       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
       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
SEE ALSO
       Routines: suser(9r)

								privileged(9r)
[top]

List of man pages available for DigitalUNIX

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