From aa381148a3b7fcf0772ea587e3d7969bd637dfcc Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Thu, 12 Nov 2009 22:05:45 -0800 Subject: [PATCH] Fix the daemon test when running it as root. --- testsuite/rsync.fns | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns index 19838776..b58bd0db 100644 --- a/testsuite/rsync.fns +++ b/testsuite/rsync.fns @@ -256,6 +256,17 @@ build_rsyncd_conf() { logfile="$scratchdir/rsyncd.log" hostname=`uname -n` + uid_setting='uid = 0' + gid_setting='gid = 0' + case `id -u` in + 0) ;; + *) + # Non-root cannot specify uid & gid settings + uid_setting="#$uid_setting" + gid_setting="#$gid_setting" + ;; + esac + cat >"$conf" <