UID/GID bug in chrooted shells fixed.
Tom Worley
raq at worley.co.uk
Fri Jun 14 03:57:02 EST 2002
On Friday 14 June 2002 12:09 am, Martin Pool wrote:
> I'm not how that script will cause them to be set, but it may be
> eff=root, real=testluser. In that case rsync will probably get pretty
> confused, because I think it calls getuid() and will therefore think
> it's not root, even though it is. As Dave says, this is not a
> supported mode of operation: rsync wants to either be root, or not,
> but not halfway.
Ok, I'm not sure if this may cause any other issues, however I altered the
main.c code, line 858, from:
am_root = (getuid() == 0);
to:
am_root = (geteuid() == 0);
It compiles without problem, and works perfectly under our conditions, and
also works without setuid root as a normal, non-root, user, and also returns
the correct uid for root when run without setuid root as root (if you see
what I mean). Basically it works with/without setuid root, inside or outside
a chroot jail with a root or non-root user as it should do.
Kind regards,
Tom Worley
Worley Web Solutions
http://www.worleyweb.net
http://www.totalannihilation2.com
http://www.uk2raq.com
http://projectmist.org
More information about the rsync
mailing list