git://git.iain.cx/iain
/
profile.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Preserve umask.
[profile.git]
/
opt
/
bin
/
become
diff --git
a/opt/bin/become
b/opt/bin/become
index
875bd0b
..
b6b2f20
100755
(executable)
--- a/
opt/bin/become
+++ b/
opt/bin/become
@@
-38,8
+38,10
@@
profile="$BECOME/$user"
[ -f "$profile" ] || profile="$BECOME/all"
file="${TMPDIR:-/tmp}/$USER.become.$user.$RANDOM.$$"
[ -f "$profile" ] || profile="$BECOME/all"
file="${TMPDIR:-/tmp}/$USER.become.$user.$RANDOM.$$"
-umask 077
+umask=$(builtin umask -p)
+builtin umask 077
if exec 3>"$file" && exec <"$file" && rm "$file"; then
if exec 3>"$file" && exec <"$file" && rm "$file"; then
+ builtin $umask
echo >&3 "cd"
echo >&3 "PROFILE_HOME='$HOME'"
if [ -n "$PRINCIPAL" ]; then
echo >&3 "cd"
echo >&3 "PROFILE_HOME='$HOME'"
if [ -n "$PRINCIPAL" ]; then