The branch, b3.0.x has been updated via c6bed2d Explicitly mention spaces in the "path" setting. via ecae885 Improve lsh's handling of -l user option w/cd. via f350413 Move var declaration for older C compilers. from 93bdc64 Preparing for release of 3.0.9pre1
;a=shortlog;h=b3.0.x - Log ----------------------------------------------------------------- commit c6bed2d9eee2dda657ed2e5d2200565cf92264bd Author: Wayne Davison <way...@samba.org> Date: Mon May 16 11:24:07 2011 -0700 Explicitly mention spaces in the "path" setting. commit ecae885a5194cf2c23fda2968845bded2802b84d Author: Wayne Davison <way...@samba.org> Date: Sat Apr 9 08:33:55 2011 -0700 Improve lsh's handling of -l user option w/cd. commit f3504138141f8332498ce3298b6c10335b8fdd28 Author: Wayne Davison <way...@samba.org> Date: Sun Apr 3 18:02:45 2011 -0700 Move var declaration for older C compilers. ----------------------------------------------------------------------- Summary of changes: flist.c | 3 ++- rsyncd.conf.yo | 6 ++++++ support/lsh | 14 ++++++-------- 3 files changed, 14 insertions(+), 9 deletions(-) Changeset truncated at 500 lines: diff --git a/flist.c b/flist.c index 7102b5b..9e5bdd0 100644 --- a/flist.c +++ b/flist.c @@ -1646,11 +1646,12 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len, remainder = 0; for (errno = 0, di = readdir(d); di; errno = 0, di = readdir(d)) { + unsigned name_len; char *dname = d_name(di); if (dname[0] == '.' && (dname[1] == '\0' || (dname[1] == '.' && dname[2] == '\0'))) continue; - unsigned name_len = strlcpy(p, dname, remainder); + name_len = strlcpy(p, dname, remainder); if (name_len >= remainder) { char save = fbuf[len]; fbuf[len] = '\0'; diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo index 9e1926a..0f5215c 100644 --- a/rsyncd.conf.yo +++ b/rsyncd.conf.yo @@ -127,6 +127,12 @@ dit(bf(path)) This parameter specifies the directory in the daemon's filesystem to make available in this module. You must specify this parameter for each module in tt(rsyncd.conf). +It is fine if the path includes internal spaces -- they will be retained +verbatim (which means that you shouldn't try to escape them). If your final +directory has a trailing space (and this is somehow not something you wish to +fix), append a trailing slash to the path to avoid losing the trailing +whitespace. + dit(bf(use chroot)) If "use chroot" is true, the rsync daemon will chroot to the "path" before starting the file transfer with the client. This has the advantage of extra protection against possible implementation security diff --git a/support/lsh b/support/lsh index 65488dc..8ccc5a2 100755 --- a/support/lsh +++ b/support/lsh @@ -7,7 +7,6 @@ # command. user='' -prefix='' do_cd=y # Default path is user's home dir, just like ssh. while : ; do @@ -22,14 +21,13 @@ while : ; do done if [ "$user" ]; then - prefix="sudo -H -u '$user'" + prefix='' if [ $do_cd = y ]; then home=`perl -e "print((getpwnam('$user'))[7])"` - # Yeah, this may fail, but attempts to get sudo to cd are harder. - cd $home + prefix="cd '$home' ;" fi -elif [ $do_cd = y ]; then - cd + sudo -H -u "$user" sh -c "$prefix $*" +else + [ $do_cd = y ] && cd + eval "${@}" fi - -eval $prefix "${@}" -- The rsync repository. _______________________________________________ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs