summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/eg/scan/scan_passwd
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2002-05-16 10:09:28 +0000
committermarkm <markm@FreeBSD.org>2002-05-16 10:09:28 +0000
commitf56e05005c751822074f0a22aa9a98d2eb189924 (patch)
treee28fc632241c9d248069d45dd9ab2a41fa64868f /contrib/perl5/eg/scan/scan_passwd
parent344ddc14973a1519f100f54051dcb068069fe43c (diff)
downloadFreeBSD-src-f56e05005c751822074f0a22aa9a98d2eb189924.zip
FreeBSD-src-f56e05005c751822074f0a22aa9a98d2eb189924.tar.gz
Perl is no longer in base. Long live the port!
Diffstat (limited to 'contrib/perl5/eg/scan/scan_passwd')
-rw-r--r--contrib/perl5/eg/scan/scan_passwd30
1 files changed, 0 insertions, 30 deletions
diff --git a/contrib/perl5/eg/scan/scan_passwd b/contrib/perl5/eg/scan/scan_passwd
deleted file mode 100644
index 50f6fc8..0000000
--- a/contrib/perl5/eg/scan/scan_passwd
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/perl
-
-# $RCSfile: scan_passwd,v $$Revision: 4.1 $$Date: 92/08/07 17:20:38 $
-
-# This scans passwd file for security holes.
-
-open(Pass,'/etc/passwd') || die "Can't open passwd file: $!\n";
-# $dotriv = (`date` =~ /^Mon/);
-$dotriv = 1;
-
-while (<Pass>) {
- ($login,$pass,$uid,$gid,$gcos,$home,$shell) = split(/:/);
- if ($shell eq '') {
- print "Short: $_";
- }
- next if /^[+]/;
- if ($pass eq '') {
- if (index(":sync:lpq:+:", ":$login:") < 0) {
- print "No pass: $login\t$gcos\n";
- }
- }
- elsif ($dotriv && crypt($login,substr($pass,0,2)) eq $pass) {
- print "Trivial: $login\t$gcos\n";
- }
- if ($uid == 0) {
- if ($login !~ /^.?root$/ && $pass ne '*') {
- print "Extra root: $_";
- }
- }
-}
OpenPOWER on IntegriCloud