From matt at mattmccutchen.net Thu Nov 12 21:27:12 2009 From: matt at mattmccutchen.net (Matt McCutchen) Date: Fri, 13 Nov 2009 00:27:12 -0500 Subject: [Rsync-patches] [PATCH] Conditionalize the test daemon's "uid" and "gid" parameters. In-Reply-To: <1258089115.1969.201.camel@mattlaptop2.local> References: <1258089115.1969.201.camel@mattlaptop2.local> Message-ID: <1258090032.1969.203.camel@mattlaptop2.local> This makes the daemon tests work once again when run as root. See: http://lists.samba.org/archive/rsync/2009-November/024216.html --- testsuite/rsync.fns | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns index 1983877..bff54e5 100644 --- a/testsuite/rsync.fns +++ b/testsuite/rsync.fns @@ -268,8 +268,18 @@ log format = %i %h [%a] %m (%u) %l %f%L transfer logging = yes exclude = ? foobar.baz max verbosity = 4 -#uid = 0 -#gid = 0 +EOF + + # Root needs to avoid dropping to nobody so that it can write to root-owned + # dirs, while unprivileged users would fail to setuid/setgid. + case `id -u` in + 0) + echo "uid = 0" >>"$conf" + echo "gid = 0" >>"$conf" + ;; + esac + + cat >>"$conf" < --- rsync.yo | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/rsync.yo b/rsync.yo index 17a293a..d461c06 100644 --- a/rsync.yo +++ b/rsync.yo @@ -736,6 +736,8 @@ specify a backup suffix using the bf(--suffix) option (otherwise the files backed up in the specified directory will keep their original filenames). +If em(DIR) is a relative path, it is relative to the destination directory. + dit(bf(--suffix=SUFFIX)) This option allows you to override the default backup suffix used with the bf(--backup) (bf(-b)) option. The default suffix is a ~ if no -bf(-backup-dir) was specified, otherwise it is an empty string. -- 1.6.2.18.gdd77