git://git.iain.cx/iain
/
profile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
09eb982
)
Don't leak file descriptor.
author
Iain Patterson
<me@iain.cx>
Thu, 18 Mar 2010 22:23:05 +0000
(22:23 +0000)
committer
Iain Patterson
<me@iain.cx>
Thu, 18 Mar 2010 22:23:05 +0000
(22:23 +0000)
opt/bin/become
patch
|
blob
|
history
diff --git
a/opt/bin/become
b/opt/bin/become
index
db45e55
..
875bd0b
100755
(executable)
--- a/
opt/bin/become
+++ b/
opt/bin/become
@@
-68,6
+68,7
@@
echo >&3 ". $HOME/.bash_profile"
[ -f "$BECOME/all" ] && cat >&3 2>/dev/null "$BECOME/all"
[ -f "$BECOME/$user" ] && cat >&3 2>/dev/null "$BECOME/$user"
+exec 3>&-
dir=$(dirname "$0")
[ "$dir" = "." ] && dir="$PWD"
exec sudo -H -u "$user" "$dir/became"