diff options
author | Peter Palfrader <peter@palfrader.org> | 2003-11-02 05:59:26 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2003-11-02 05:59:26 +0000 |
commit | 44bd5970e133d285dbeea12653b74f273f315533 (patch) | |
tree | 8929c0ce56600ef4d7ba351429900414ba168c7f /pingd | |
parent | db114aba521cbc15e7ca466da38c97dcb0cd3833 (diff) |
Refuse to run with euid == 0
Diffstat (limited to 'pingd')
-rwxr-xr-x | pingd | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -3,7 +3,7 @@ $| = 1; # (c) 2002, 2003 Peter Palfrader <peter@palfrader.org> -# $Id: pingd,v 1.109 2003/10/20 15:53:54 weasel Exp $ +# $Id: pingd,v 1.110 2003/11/02 05:59:26 weasel Exp $ # =pod @@ -646,7 +646,8 @@ sub hup_if_wanted($) { - +($EUID == 0) and + die("$PROGRAM_NAME should not be run as root.\n"); my $params = { basedir => $Bin }; $params->{'basedir'} = $ENV{'ECHOLOT_HOME'} if (defined $ENV{'ECHOLOT_HOME'}); |