Help for this page

Select Code to Download


  1. or download this
    die "Usage: permmy -[itcad] [directory] -f config-file\n"
    unless @ARGV >= 3;
    
    use vars qw/ $opt_t $opt_c $opt_d $opt_i $opt_f $opt_a/;
    getopts('tcdi:f:a:') or die "Usable options are -tcifa: $!\n";
    
  2. or download this
    sub usage {
      my $text = <<USAGE;
    ...
      print $text;
      exit 0;
    }
    
  3. or download this
    if ($opt_t || $opt_d || $opt_c)
    {
    ...
    {
        ...
    }
    
  4. or download this
    exit 0;
    
    # --- subroutines
    
  5. or download this
    if ($opt_d) {
      configtest();
    ...
      configtest();
      changeperms();  # or whatever this actually does
    }
    
  6. or download this
      if (valid($foo)) { ... }
    
  7. or download this
      if ($obj->valid) { ... }
    
  8. or download this
      validate($foo);   # dies if invalid
    
  9. or download this
    sub configurator ($$$$)
    {
    ...
        exit;
        close CONFIG or die "Could not close config file $conf_file: $!\n"
    +;
    }
    
  10. or download this
      my $nice_mode = &return_mode($mode);
    
  11. or download this
    sub change_mode ($$)
    {
      ...(oct($change_value) != oct($c_nice_mode))...
    }
    
  12. or download this
            chown($num_uid, -1, $the_file) or warn "Could not change owner
    + of $the_file: $!\n";
            print "Changed owner of $the_file from $c_pwuid to $change_val
    +ue\n";
    
  13. or download this
      if (chown(...)) {
        print "success";
      } else {
        warn "failure";
      }
    
  14. or download this
      chown(...) or do { warn "failure"; return };
      print ...
    
  15. or download this
                        if ($testy eq "dir-mode") { $d_mode = $config{$tes
    +t}{$tester}{$testy} }
                        elsif ($testy eq "file-mode") { $f_mode = $config{
    +$test}{$tester}{$testy} }
                        ...
    
  16. or download this
      elsif ((-d $_) && ($d_uid))