--- resend.Dist Fri Jan 7 07:32:39 2000 +++ resend Sun Apr 16 23:15:50 2000 @@ -84,11 +84,23 @@ # Despite not having a place to send the remains of the body, # it would be nice to send a message to root or postmaster, at least... # -if (! -r $cf) { - die("$cf not readable; stopped"); -} -require "$cf"; +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 '',),$@) +{ + die qq|Unable to eval "$cf": $@.\n|; +} +else +{ + close CONFIG; +} chdir($homedir) || die("Can't chdir(\"$homedir\"): $!"); @@ -111,7 +123,7 @@ # XXX It is possible that owner-$opt_l won't be the right address, but we # have little choice. Sending the bounces to $whoami_owner is an option, # but might not clearly indicate the list name. -$sendmail_command = $sendmail_command || "/usr/lib/sendmail"; +$sendmail_command = $sendmail_command || "/usr/sbin/sendmail"; $bounce_mailer = $bounce_mailer || "$sendmail_command -f\$sender -t"; &set_mail_from("owner-$opt_l"); &set_mail_sender("owner-$opt_l"); @@ -936,7 +948,7 @@ else { # Painful, but we have to provide some kind of backwards # compatibility and this is what 1.93 used - $mailcmd = "/usr/lib/sendmail -f$sender -t"; + $mailcmd = "/usr/sbin/sendmail -f$sender -t"; } # clean up the addresses, for use on the sendmail command line