Implementation question: curr_dir and symlinks

Arne Jansen sensille at
Mon Oct 11 05:31:16 MDT 2010


I try to understand some implementation details and the consequences of those:
the internal function change_dir() keeps track of a global variable curr_dir.
If it is passed a path with '/../' it tries to sanitize the path before storing
it in curr_dir. I searched for a problem where the path passed to rsync
contained both '../' and symlinks. The leads to a discrepancy between the cwd
and curr_dir, because change_dir (or clean_fname) remove the .. from the path
without regarding the fact that it removes a symlink from the path with it. This
in turn probably leads to problems with the exclude option.

Is this a bug or are there any config options on the server side to prevent
this? I checked with rsync 3.0.5.


More information about the rsync mailing list