HCoop
/
hcoop
/
config
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae46c06
)
get-token: use sudo instead of su when switching user
author
Clinton Ebadi
<clinton@unknownlamer.org>
Sun, 22 Apr 2018 09:52:29 +0000
(
05:52
-0400)
committer
Clinton Ebadi
<clinton@unknownlamer.org>
Sun, 22 Apr 2018 09:52:29 +0000
(
05:52
-0400)
su is losing tokens, sudo is not
get-token
patch
|
blob
|
blame
|
history
diff --git
a/get-token
b/get-token
index
e6cd16c
..
2a94863
100755
(executable)
--- a/
get-token
+++ b/
get-token
@@
-33,7
+33,7
@@
if test "$REALUSER" = "root"; then
exit 1
else
USER=$(getent passwd "$1" | cut -d':' -f 1)
- exec su
$USER -c "$0 $1 norecurse"
+ exec su
do -u $USER -- $0 $1 norecurse
fi
fi