Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c6679e0
)
Some quoting fixes/improvements.
author
Wayne Davison
<wayned@samba.org>
Mon, 6 Sep 2010 15:41:46 +0000
(08:41 -0700)
committer
Wayne Davison
<wayned@samba.org>
Mon, 6 Sep 2010 15:41:46 +0000
(08:41 -0700)
support/lsh
patch
|
blob
|
blame
|
history
diff --git
a/support/lsh
b/support/lsh
index
2017126
..
65488dc
100755
(executable)
--- a/
support/lsh
+++ b/
support/lsh
@@
-13,7
+13,7
@@
do_cd=y # Default path is user's home dir, just like ssh.
while : ; do
case "$1" in
-l) user="$2"; shift; shift ;;
while : ; do
case "$1" in
-l) user="$2"; shift; shift ;;
- -l*) user=`echo
$1
| sed 's/^-l//'`; shift ;;
+ -l*) user=`echo
"$1"
| sed 's/^-l//'`; shift ;;
--no-cd) do_cd=n; shift ;;
-*) shift ;;
localhost) shift; break ;;
--no-cd) do_cd=n; shift ;;
-*) shift ;;
localhost) shift; break ;;
@@
-22,9
+22,9
@@
while : ; do
done
if [ "$user" ]; then
done
if [ "$user" ]; then
- prefix="sudo -H -u
$user
"
+ prefix="sudo -H -u
'$user'
"
if [ $do_cd = y ]; then
if [ $do_cd = y ]; then
- home=`perl -e "print((getpwnam(
"$user"
))[7])"`
+ home=`perl -e "print((getpwnam(
'$user'
))[7])"`
# Yeah, this may fail, but attempts to get sudo to cd are harder.
cd $home
fi
# Yeah, this may fail, but attempts to get sudo to cd are harder.
cd $home
fi