Bug 10719 - Error with cached effective process gid
Error with cached effective process gid
Status: NEW
Product: rsync
Classification: Unclassified
Component: core
3.1.1
x64 FreeBSD
: P5 major
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-16 14:02 UTC by lonerr
Modified: 2014-07-16 14:02 UTC (History)
0 users

See Also:


Attachments

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
[dst]
	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
src
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.