summaryrefslogtreecommitdiff
path: root/eg/scan
diff options
context:
space:
mode:
Diffstat (limited to 'eg/scan')
-rw-r--r--eg/scan/scan_df4
-rw-r--r--eg/scan/scan_last2
-rw-r--r--eg/scan/scan_messages8
-rw-r--r--eg/scan/scan_passwd4
-rw-r--r--eg/scan/scan_ps2
-rw-r--r--eg/scan/scan_sudo8
-rw-r--r--eg/scan/scan_suid4
-rw-r--r--eg/scan/scanner8
8 files changed, 20 insertions, 20 deletions
diff --git a/eg/scan/scan_df b/eg/scan/scan_df
index ca316425e4..27ee81af1a 100644
--- a/eg/scan/scan_df
+++ b/eg/scan/scan_df
@@ -1,10 +1,10 @@
#!/usr/bin/perl -P
-# $Header: scan_df,v 2.0 88/06/05 00:17:56 root Exp $
+# $Header: scan_df,v 3.0 89/10/18 15:15:26 lwall Locked $
# This report points out filesystems that are in danger of overflowing.
-(chdir '/usr/adm/private/memories') || die "Can't cd.";
+(chdir '/usr/adm/private/memories') || die "Can't cd to memories: $!\n";
`df >newdf`;
open(Df, 'olddf');
diff --git a/eg/scan/scan_last b/eg/scan/scan_last
index 25d7843e30..65a07fe377 100644
--- a/eg/scan/scan_last
+++ b/eg/scan/scan_last
@@ -1,6 +1,6 @@
#!/usr/bin/perl -P
-# $Header: scan_last,v 2.0 88/06/05 00:17:58 root Exp $
+# $Header: scan_last,v 3.0 89/10/18 15:15:31 lwall Locked $
# This reports who was logged on at weird hours
diff --git a/eg/scan/scan_messages b/eg/scan/scan_messages
index 6f8ab2b58b..ae641a9c25 100644
--- a/eg/scan/scan_messages
+++ b/eg/scan/scan_messages
@@ -1,10 +1,10 @@
#!/usr/bin/perl -P
-# $Header: scan_messages,v 2.0 88/06/05 00:17:46 root Exp $
+# $Header: scan_messages,v 3.0 89/10/18 15:15:38 lwall Locked $
# This prints out extraordinary console messages. You'll need to customize.
-chdir('/usr/adm/private/memories') || die "Can't cd.";
+chdir('/usr/adm/private/memories') || die "Can't cd to memories: $!\n";
$maxpos = `cat oldmsgs 2>&1`;
@@ -197,12 +197,12 @@ while (<Msgs>) {
}
$max = tell(Msgs);
-open(tmp,'|sort >oldmsgs.tmp') || die "Can't create tmp file.";
+open(tmp,'|sort >oldmsgs.tmp') || die "Can't create tmp file: $!\n";
while ($_ = pop(@seen)) {
print tmp $_;
}
close(tmp);
-open(tmp,'oldmsgs.tmp') || die "Can't reopen tmp file.";
+open(tmp,'oldmsgs.tmp') || die "Can't reopen tmp file: $!\n";
while (<tmp>) {
if (/^nd:/) {
next if $seen{$_} < 20;
diff --git a/eg/scan/scan_passwd b/eg/scan/scan_passwd
index 62ef1e7794..f49b1a9d00 100644
--- a/eg/scan/scan_passwd
+++ b/eg/scan/scan_passwd
@@ -1,10 +1,10 @@
#!/usr/bin/perl
-# $Header: scan_passwd,v 2.0 88/06/05 00:17:49 root Exp $
+# $Header: scan_passwd,v 3.0 89/10/18 15:15:43 lwall Locked $
# This scans passwd file for security holes.
-open(Pass,'/etc/passwd') || die "Can't open passwd file";
+open(Pass,'/etc/passwd') || die "Can't open passwd file: $!\n";
# $dotriv = (`date` =~ /^Mon/);
$dotriv = 1;
diff --git a/eg/scan/scan_ps b/eg/scan/scan_ps
index bb33b87ae8..a70f360b9f 100644
--- a/eg/scan/scan_ps
+++ b/eg/scan/scan_ps
@@ -1,6 +1,6 @@
#!/usr/bin/perl -P
-# $Header: scan_ps,v 2.0 88/06/05 00:17:51 root Exp $
+# $Header: scan_ps,v 3.0 89/10/18 15:15:47 lwall Locked $
# This looks for looping processes.
diff --git a/eg/scan/scan_sudo b/eg/scan/scan_sudo
index e0a99ee0c3..bfbebe2821 100644
--- a/eg/scan/scan_sudo
+++ b/eg/scan/scan_sudo
@@ -1,10 +1,10 @@
#!/usr/bin/perl -P
-# $Header: scan_sudo,v 2.0 88/06/05 00:18:01 root Exp $
+# $Header: scan_sudo,v 3.0 89/10/18 15:15:52 lwall Locked $
# Analyze the sudo log.
-chdir('/usr/adm/private/memories') || die "Can't cd.";
+chdir('/usr/adm/private/memories') || die "Can't cd to memories: $!\n";
if (open(Oldsudo,'oldsudo')) {
$maxpos = <Oldsudo>;
@@ -41,12 +41,12 @@ while (<Sudo>) {
}
$max = tell(Sudo);
-open(tmp,'|sort >oldsudo.tmp') || die "Can't create tmp file.";
+open(tmp,'|sort >oldsudo.tmp') || die "Can't create tmp file: $!\n";
while ($_ = pop(@seen)) {
print tmp $_;
}
close(tmp);
-open(tmp,'oldsudo.tmp') || die "Can't reopen tmp file.";
+open(tmp,'oldsudo.tmp') || die "Can't reopen tmp file: $!\n";
while (<tmp>) {
print $seen{$_},":\t",$_;
}
diff --git a/eg/scan/scan_suid b/eg/scan/scan_suid
index 4f62705504..1ebca0bdbe 100644
--- a/eg/scan/scan_suid
+++ b/eg/scan/scan_suid
@@ -1,10 +1,10 @@
#!/usr/bin/perl -P
-# $Header: scan_suid,v 2.0 88/06/05 00:17:54 root Exp $
+# $Header: scan_suid,v 3.0 89/10/18 15:15:57 lwall Locked $
# Look for new setuid root files.
-chdir '/usr/adm/private/memories' || die "Can't cd.";
+chdir '/usr/adm/private/memories' || die "Can't cd to memories: $!\n";
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat('oldsuid');
diff --git a/eg/scan/scanner b/eg/scan/scanner
index 25e953d402..8ef7fe8f5d 100644
--- a/eg/scan/scanner
+++ b/eg/scan/scanner
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Header: scanner,v 2.0 88/06/05 00:17:42 root Exp $
+# $Header: scanner,v 3.0 89/10/18 15:16:02 lwall Locked $
# This runs all the scan_* routines on all the machines in /etc/ghosts.
# We run this every morning at about 6 am:
@@ -20,7 +20,7 @@ $| = 1; # command buffering on stdout
print "Subject: bizarre happenings\n\n";
-(chdir '/usr/adm/private') || die "Can't cd.";
+(chdir '/usr/adm/private') || die "Can't cd to /usr/adm/private: $!\n";
if ($#ARGV >= 0) {
@scanlist = @ARGV;
@@ -60,7 +60,7 @@ scan: while ($scan = shift(@scanlist)) {
$iter = 0;
`exec crypt -inquire <$scan >.x 2>/dev/null`;
unless (open(scan,'.x')) {
- print "Can't run $scan.";
+ print "Can't run $scan: $!\n";
next scan;
}
$cmd = <scan>;
@@ -78,7 +78,7 @@ scan: while ($scan = shift(@scanlist)) {
}
close(pipe);
} else {
- print "(Can't execute rsh.)\n";
+ print "(Can't execute rsh: $!)\n";
}
last class;
}