priv_getbyname man page on SmartOS

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

PRIV_GETBYNAME(9F)					    PRIV_GETBYNAME(9F)

NAME
       priv_getbyname - map a privilege name to a number

SYNOPSIS
       #include <sys/cred.h>

       int priv_getbyname(const char  *priv, int flags);

INTERFACE LEVEL
       Solaris DDI specific (Solaris DDI).

PARAMETERS
       priv
		name of the privilege

       flags
		flags, must be zero or PRIV_ALLOC

DESCRIPTION
       The priv_getbyname() function maps a privilege name to a privilege num‐
       ber for use with the priv_*() kernel interfaces.

       If PRIV_ALLOC is passed as a flag parameter,  an	 attempt  is  made  to
       allocate	 a  privilege  if  it  is not yet defined. The newly allocated
       privilege number is returned.

       Privilege names can be specified with an optional priv_	prefix,	 which
       is stripped.

       Privilege  names are case insensitive but allocated privileges preserve
       case.

       Allocated privileges can be at most {PRIVNAME_MAX} characters long  and
       can contain only alphanumeric characters and the underscore character.

RETURN VALUES
       This  function  returns	the privilege number, which is greater than or
       equal to 0, if it succeeds. It returns a negative error	number	if  an
       error occurs.

ERRORS
       EINVAL
		       This might be caused by any of the following

			   o	  The flags parameter is invalid.

			   o	  The specified privilege does not exist.

			   o	  The  priv parameter contains invalid charac‐
				  ters.

       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 and kernel contexts.

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

       ┌────────────────────┬─────────────────┐
       │  ATTRIBUTE TYPE    │ ATTRIBUTE VALUE │
       ├────────────────────┼─────────────────┤
       │Architecture	    │ All	      │
       ├────────────────────┼─────────────────┤
       │Interface Stability │ Committed	      │
       └────────────────────┴─────────────────┘

SEE ALSO
       attributes(5), privileges(5)

       Writing Device Drivers

				 Mar 11, 2004		    PRIV_GETBYNAME(9F)
[top]

List of man pages available for SmartOS

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