Bug 10719 - Error with cached effective process gid
Summary: Error with cached effective process gid
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.1
Hardware: x64 FreeBSD
: P5 major (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
Depends on:
Reported: 2014-07-16 14:02 UTC by lonerr
Modified: 2017-10-10 00:18 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description lonerr 2014-07-16 14:02:25 UTC
Tere was an error in previous git commit 3b83a22057b71e7df2b960d3997fb4474910f30e:
[lonerr@neon ~/src/rsync]% git show 3b83a22057b71e7df2b960d3997fb4474910f30e
commit 3b83a22057b71e7df2b960d3997fb4474910f30e
Author: Wayne Davison <wayned@samba.org>
Date:   Wed Sep 2 08:56:34 2009 -0700

    Define and use "our_gid" variable.

In this commit effective process gid determined once (in main.c), but after client connect and daemon forked effective gid may be different (when you use the 'gid' option in config file).
Now this commit was merged in 3.1.x thus broken some use cases.

Simple test case:

1. Prepare destination catalog:
rm -rf /tmp/dst && mkdir /tmp/dst && chmod 755 /tmp/dst && chown nobody:nobody /tmp/dst

2. Prepare minimal rsyncd.conf:
pid file = /var/run/rsyncd.pid
uid = nobody
gid = nobody
read only = no
use chroot = no
	path = /tmp/dst

3. Start rsyncd as standalone daemon with standard rc script.

4. Try to rsync empty file belongs to group wheel (gid==0).
touch /tmp/src && chown 0:0 /tmp/src && rsync -av /tmp/src localhost::dst/
sending incremental file list
rsync: chgrp ".src.tIDLzz" (in dst) failed: Operation not permitted (1)

sent 79 bytes  received 111 bytes  380.00 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1165) [sender=3.1.1]

With this commit rollbacked - operation is restored.
Comment 1 lonerr 2017-10-09 23:24:35 UTC
Three years later, any updates? :)
Comment 2 Wayne Davison 2017-10-10 00:18:28 UTC
I've just committed a fix for this to git.