|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T u
Length: 1870 (0x74e) Types: TextFile Names: »user.chk«
└─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen └─⟦3da311d67⟧ »./cops/1.04/cops_104.tar.Z« └─⟦6a2577110⟧ └─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen └─⟦6a2577110⟧ »./cops/1.04/cops_104.tar« └─⟦this⟧ »cops_104/perl/user.chk«
#!/bin/sh -- need to mention perl here to avoid recursion 'true' || eval 'exec perl -S $0 $argv:q'; eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec /usr/local/bin/perl -S $0 $argv:q' if 0; # # This combines user.chk and home.chk. It searches for home directories # and various user startup files for world writability, as well as flagging # any .rhosts and .netrc files that are readable. You can change the # files checked by changing @ftable and @readables, respectively. # # # check for writable files in all user's homes # require "pass.cache.pl"; require "is_able.pl"; # files checked for: @ftable = ("rhosts", "profile", "login", "logout", "cshrc", "bashrc", "bash_profile", "inputrc", "screenrc", "kshrc", "tcshrc", "netrc", "forward", "dbxinit", "distfile", "exrc", "emacsrc", "remote", "mh_profile", "xinitrc", "xsession", "Xdefaults", "Xresources", "rninit"); @readables = ("netrc", "rhosts"); local(%done); # what's the point of doing a keys and using $i ?? # why not just do "for $dir (values %uname2dir) {" ???? for $i (keys %uname2dir) { $dir = $uname2dir{$i}; # I don't want to hear about every file in their home dir, if # is WW, but still need to check the .netrc file for readability... next unless $dir; next if $done{$dir}++; if (-e $dir) { if (&is_able($dir, "w", "w")) { for $r (@readables) { if (-s "$dir/.$r") { &is_able("$dir/.$r", "w", "r"); } } next; } for $file (@ftable) { $foo_file = $dir . "/.$file"; if (-e $foo_file) { &is_able($foo_file, "w", "w"); for $r (@readables) { if ($file eq $r && -s $foo_file) { &is_able($foo_file, "w", "r"); } } } } } } 1;