Storing ownership / device nodes without root
wayned at samba.org
Fri Oct 27 07:46:27 GMT 2006
On Fri, Oct 27, 2006 at 03:55:09AM +0200, Wesley W. Terpstra wrote:
> There are a couple bits I think belong in xattrs.patch instead.
> Specifically, storing EAs before ACLs in rsync.c and including the
> removexattr method.
I agree. I've added those bits to the xattr.diff. At some point the
xattr patch will need to be improved to be able to remove xattr values
on files that are otherwise up-to-date.
> I am a bit puzzled why -a sends the owner, but not the group to my
> remote fake super rsyncd. To get the group sent I either have to be
> root on the client-side or use --super.
This is because the -g option works in two different ways, one if you're
root (where all group values are preserved), and another if you're not
(where any group values that aren't in the current user's set of groups
are changed into GID_NONE). I was actually expecting the --fake-super
option to set am_root anyway, so I think doing that is an easy fix.
I also think we can simplify the algorithm to save one compound value.
I changed your patch to put the mode, rdev, uid, and gid info into a
single string of the form "%o %d %d:%d".
I also changed the code so that all the files it writes out are created
using the (umask & 0666) for files and (umask & 0777) for dirs. This
gives the user a way to control how they want the files to appear, and
ensures that no file gets any special privileges.
I also made sure that it was impossible for someone to send a special
rsync EA value when --xattrs is in effect to a --fake-super process.
See what you think of the result:
More information about the rsync