Code Review
/
fuel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
0dc771a
)
Get user id without forking a shell.
07/12107/1
author
Peter Barabas
<peter.barabas@ericsson.com>
Thu, 10 Mar 2016 12:14:53 +0000
(13:14 +0100)
committer
Jonas Bjurel
<jonas.bjurel@ericsson.com>
Sat, 9 Apr 2016 17:58:14 +0000
(17:58 +0000)
Change-Id: I6789b81186b7ede124a838a5b6668ba8326e0c0b
Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
(cherry picked from commit
befc84a9d28663a45510c71119980e1cf5b6eeca
)
deploy/common.py
patch
|
blob
|
history
diff --git
a/deploy/common.py
b/deploy/common.py
index
cc418b5
..
787a21a
100644
(file)
--- a/
deploy/common.py
+++ b/
deploy/common.py
@@
-133,8
+133,8
@@
def commafy(comma_separated_list):
def check_if_root():
-
r = exec_cmd('whoami'
)
- if
r != 'root'
:
+
uid = os.getuid(
)
+ if
uid != 0
:
err('You need be root to run this application')