5373fd28de
PR: 17820 Submitted by: Doug Barton <DougB@gorean.org> and Klaus Brunner <klaus@winf.htu.at>
38 lines
928 B
Text
38 lines
928 B
Text
--- archive2.pl.Dist Fri Jan 7 03:00:49 2000
|
|
+++ archive2.pl Sun Apr 16 23:15:49 2000
|
|
@@ -54,10 +54,23 @@
|
|
shift(@ARGV);
|
|
shift(@ARGV);
|
|
}
|
|
-if (! -r $cf) {
|
|
- die("$cf not readable; stopped");
|
|
+
|
|
+if (not sysopen CONFIG,$cf,O_RDONLY)
|
|
+{
|
|
+ die sprintf qq|Unable to sysopen config file "$cf"%s.\n|,$! ? ": $!" : '';
|
|
+}
|
|
+elsif ((stat CONFIG)[4] != $>)
|
|
+{
|
|
+ die qq|Config file "$cf" not owned by effective UID.\n|;
|
|
+}
|
|
+elsif (eval(join '',<CONFIG>),$@)
|
|
+{
|
|
+ die qq|Unable to eval "$cf": $@.\n|;
|
|
+}
|
|
+else
|
|
+{
|
|
+ close CONFIG;
|
|
}
|
|
-require "$cf";
|
|
|
|
# All these should be in the standard PERL library
|
|
unshift(@INC, $homedir);
|
|
@@ -88,7 +101,7 @@
|
|
exit 1;
|
|
}
|
|
|
|
-$sendmail_command = $sendmail_command || "/usr/lib/sendmail";
|
|
+$sendmail_command = $sendmail_command || "/usr/sbin/sendmail";
|
|
$bounce_mailer = $bounce_mailer || "$sendmail_command -f\$sender -t";
|
|
&set_abort_addr($whoami_owner);
|
|
&set_mail_from($whoami);
|