Ticket #725: 725.patch

File 725.patch, 1.1 KB (added by mcoppola, at 2011-05-04T07:17:51Z)
Line 
1diff -crB allmydata-tahoe-1.8.2-orig/src/allmydata/scripts/runner.py allmydata-tahoe-1.8.2/src/allmydata/scripts/runner.py
2*** allmydata-tahoe-1.8.2-orig/src/allmydata/scripts/runner.py  2011-01-30 18:39:34.000000000 -0600
3--- allmydata-tahoe-1.8.2/src/allmydata/scripts/runner.py       2011-05-04 03:07:34.662991576 -0500
4***************
5*** 1,5 ****
6--- 1,6 ----
7 
8  import sys
9+ import os
10  from cStringIO import StringIO
11 
12  from twisted.python import usage
13***************
14*** 89,94 ****
15--- 90,101 ----
16      so.stderr = stderr
17      so.stdin = stdin
18 
19+     if os.geteuid() == 0:
20+         print >>stdout, "\n###############################################################"
21+         print >>stdout, "WARNING: You should not be running Tahoe-LAFS as root!"
22+         print >>stdout, "This poses an unnecessary security risk and is NOT recommended."
23+         print >>stdout, "###############################################################\n"
24+
25      if command in create_dispatch:
26          rc = create_dispatch[command](so, stdout, stderr)
27      elif command in startstop_node.dispatch: