Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
83e39640
Commit
83e39640
authored
Jul 02, 2012
by
Mukund Sivaraman
Browse files
[2062] Print a message to stderr when not run as root
parent
99d2c13f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/showtech/showtech.py.in
View file @
83e39640
...
...
@@ -79,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()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment