summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2003-11-02 05:59:26 +0000
committerPeter Palfrader <peter@palfrader.org>2003-11-02 05:59:26 +0000
commit44bd5970e133d285dbeea12653b74f273f315533 (patch)
tree8929c0ce56600ef4d7ba351429900414ba168c7f
parentdb114aba521cbc15e7ca466da38c97dcb0cd3833 (diff)
Refuse to run with euid == 0
-rw-r--r--NEWS1
-rw-r--r--TODO3
-rwxr-xr-xpingd5
3 files changed, 5 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index f936e99..73595e2 100644
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,7 @@ Changes in
public stats. Testing indicates a node is not ready for real
users' traffic yet.
* Publish operator's address on index page.
+ * Refuse to run with euid == 0.
Changes in version 2.1 - 2003-03-03
* Minor documentation fixes suggested by Ryan Lackey.
diff --git a/TODO b/TODO
index 1748051..8496663 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,4 @@
-$Id: TODO,v 1.66 2003/11/02 05:56:24 weasel Exp $
+$Id: TODO,v 1.67 2003/11/02 05:59:26 weasel Exp $
Legend:
- Not done
@@ -8,7 +8,6 @@ Legend:
D Deferred
X Abandoned
- - refuse to run as root.
- updated information with from lines
- don't send that many messages with From Headers
- supress mixmaster output:
diff --git a/pingd b/pingd
index d91cf32..dea1d2a 100755
--- a/pingd
+++ b/pingd
@@ -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'});