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:
cece2e3
)
Fix the daemon test when running it as root.
author
Wayne Davison
<wayned@samba.org>
Fri, 13 Nov 2009 06:05:45 +0000
(22:05 -0800)
committer
Wayne Davison
<wayned@samba.org>
Fri, 13 Nov 2009 06:05:45 +0000
(22:05 -0800)
testsuite/rsync.fns
patch
|
blob
|
blame
|
history
diff --git
a/testsuite/rsync.fns
b/testsuite/rsync.fns
index
1983877
..
b58bd0d
100644
(file)
--- a/
testsuite/rsync.fns
+++ b/
testsuite/rsync.fns
@@
-256,6
+256,17
@@
build_rsyncd_conf() {
logfile="$scratchdir/rsyncd.log"
hostname=`uname -n`
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" <<EOF
# rsyncd configuration file autogenerated by $0
cat >"$conf" <<EOF
# rsyncd configuration file autogenerated by $0
@@
-268,8
+279,8
@@
log format = %i %h [%a] %m (%u) %l %f%L
transfer logging = yes
exclude = ? foobar.baz
max verbosity = 4
transfer logging = yes
exclude = ? foobar.baz
max verbosity = 4
-#uid = 0
-#gid = 0
+$uid_setting
+$gid_setting
[test-from]
path = $fromdir
[test-from]
path = $fromdir