NOCpulse::SetID man page on Fedora

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

SetID(3)	      User Contributed Perl Documentation	      SetID(3)

NAME
       NOCpulse::SetID - Set user and group IDs and revert

SYNOPSIS
	 use NOCpulse::SetID;

	 # Create a new identity

	 my $identity = NOCpulse::SetID->new( user => 'nocpulse');

	 # Temporarily set credentials

	 $identity->su();     # Set IDs to $identity's IDs

	 # ... reduced-privilege code goes here

	 $identity->revert(); # Revert to credentials before su()

	 # Permanently set IDs to $identity (revert not possible)

	 $identity->su(permanent => 1);

DESCRIPTION
       NOCpulse::SetID allows a process to change its credentials by setting
       real and effective user and group IDs, supplemental group memberships,
       and user-related environment variables ($HOME, $LOGNAME, $SHELL, $USER,
       $USERNAME, and $PATH).

METHODS
       new()
	 Create a new identity.	 Without arguments, new() takes all parameters
	 from the current environment.	With a 'user' argument, new() takes
	 all parameters from the user's passwd and group entries.  In either
	 case, you can override individual parameters.	The full syntax is:

	   my $identity = new (
				[user	=> $username,]
				[ruid	=> $username_or_uid,]
				[euid	=> $username_or_uid,]
				[rgid	=> $groupname_or_gid,]
				[egid	=> $groupname_or_gid,]
				[groups => \@groupnames_or_gids,]
				[env	=> \%env_hash,]
			      );

       su()
	 Become the new identity.  Without arguments, su() temporarily changes
	 to the new identity; the identity that was in effect when su() was
	 called can be restored by calling revert().  With the 'permanent'
	 argument set to a true value, su() will switch to the new identity
	 permanently, and revert() will generate a fatal error if called.

       revert()
	 Switch back to the previous identity.	When you call su(), the
	 function stores the current identity (real and effective UIDs and
	 GIDs, supplemental group memberships, and user-related environment
	 variables) in the object, unless the 'permanent' argument is
	 supplied.  revert() switches back to the stored identity.

EXPORTS
       None.

AUTHOR
       Dave Faraldo <dfaraldo@redhat.com>

SEE ALSO
       perl, perlvars, English

perl v5.14.0			  2009-02-18			      SetID(3)
[top]

List of man pages available for Fedora

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