> I believe you'd want $> , the effective uid.  

Probably.  See
 $ perldoc perlvar 
or  http://perldoc.perl.org/perlvar.html
under $REAL_USER_ID and $EFFECTIVE_USER_ID, but also see $REAL_GROUP_ID
$EFFECTIVE_GROUP_ID, you may need to set that too to get the desired
effect.See also POSIX::setuid()
 http://perldoc.perl.org/POSIX.html#FUNCTIONS

If the script is running as Root, particularly but not limited to
Setuid'd, be sure to set the -T taint flag and un-taint all your
external arguments.
  perldoc perlrun
  perldoc perlsec
 http://perldoc.perl.org/search.html?q=taint

(If not running as root, you can't change user anyway.)

Bill
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to