diff options
| -rwxr-xr-x | sbosrcarch | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -425,6 +425,11 @@ our $totalfiles = 0; # check_single_instance() returns. our $self_fh; +# 20260523 bkw: as requested by Tadgy: +sub check_non_root { + die "$0 may not be run as root.\n" unless $<; +} + # 20260523 bkw: This may not be portable to non-Linux (or even to # Perl built on non-Slackware), but it doesn't have to be. sub check_single_instance { @@ -1992,6 +1997,7 @@ EOF $|++; usage() unless (defined $ARGV[0] && $ARGV[0] !~ /^-+h(?:elp)?/); +check_non_root(); check_single_instance(); read_config(); for ($ARGV[0]) { |
