Help for this page

Select Code to Download


  1. or download this
    my $un = shift;
    unless( $un ~= s/\A([_A-Za-z][_A-Za-z0-9]+)\Z/$1/ ){
    ...
    $un = lc($un);
    ...
    unless($<){..}
    
  2. or download this
    #uid check
    unless($< == 0){ # Log attempt and exit; 
    ...
    #carry on
    if(defined(getpwnam $un)){ .. }