rsync 2.3.2 with --copy-unsafe-links work badly

Dave Dykstra dwd at bell-labs.com
Mon Apr 8 10:26:02 EST 2002


I'm sorry, but I've never looked at that part of the code so I don't have
any expertise to contribute.  A quick look at it makes me also wonder why
that's depth=0.  CVS shows it was that way ever since Tridge put in the
option in util.c version 1.53, before my time as maintainer.

I'm also sorry that I've been out of touch on rsync for 2 weeks; I was out
for 6 days of vacation and I still haven't had a chance to look at mail
from any mailing lists because I haven't made it through my primary inbox
yet :-).

- Dave Dykstra

On Mon, Apr 08, 2002 at 04:56:28PM +1000, Martin Pool wrote:
> Dave, can you explain to me what exactly unsafe_symlink is meant to
> do?  I can see broadly that it's meant to prevent symlinks pointing
> out of "the directory being copied", but when not using path= and a
> daemon it's not clear what directory that refers to.  
> 
> Also, I don't understand this line:
> 
> > 	/* find out what our safety margin is */
> > 	for (tok=strtok(src,"/"); tok; tok=strtok(NULL,"/")) {
> > 		if (strcmp(tok,"..") == 0) {
> > 			depth=0;
> 
> Why depth=0 rather than depth--?
> 
> Thanks,
> -- 
> Martin 




More information about the rsync mailing list