BIND 10 trac2062, updated. 83e396404b5f484f1d2462664948ee6031abe638 [2062] Print a message to stderr when not run as root

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Jul 2 02:44:21 UTC 2012


The branch, trac2062 has been updated
       via  83e396404b5f484f1d2462664948ee6031abe638 (commit)
       via  99d2c13f8d73b423fde8e557f8775e4c24ca6d03 (commit)
      from  7e93a92e0d3f54263bd0d72cbdcb06c30229ac1f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 83e396404b5f484f1d2462664948ee6031abe638
Author: Mukund Sivaraman <muks at isc.org>
Date:   Mon Jul 2 08:13:21 2012 +0530

    [2062] Print a message to stderr when not run as root

commit 99d2c13f8d73b423fde8e557f8775e4c24ca6d03
Author: Mukund Sivaraman <muks at isc.org>
Date:   Mon Jul 2 08:01:09 2012 +0530

    [2062] Call isc.util.process.rename() in b10-showtech

-----------------------------------------------------------------------

Summary of changes:
 src/bin/showtech/showtech.py.in |   12 ++++++++++++
 1 file changed, 12 insertions(+)

-----------------------------------------------------------------------
diff --git a/src/bin/showtech/showtech.py.in b/src/bin/showtech/showtech.py.in
index cacd163..8cb5ee2 100755
--- a/src/bin/showtech/showtech.py.in
+++ b/src/bin/showtech/showtech.py.in
@@ -21,8 +21,11 @@ BIND 10 showtech program.
 """
 
 import sys; sys.path.append ('@@PYTHONPATH@@')
+import isc.util.process
 from isc.sysinfo import *
 
+isc.util.process.rename()
+
 def main():
     s = SysInfoFromFactory()
 
@@ -76,5 +79,14 @@ def main():
     print('~~~~~~~~~~~\n')
     print(s.get_net_connections())
 
+    try:
+        if os.getuid() != 0:
+            sys.stderr.write('\n')
+            sys.stderr.write('NOTE: You have to run this program as the root user so that it can\n')
+            sys.stderr.write('      collect all the information it requires. Some information is\n')
+            sys.stderr.write('      only available to the root user.\n\n')
+    except Exception:
+        pass
+
 if __name__ == '__main__':
     main()



More information about the bind10-changes mailing list