patch for replacing non-printable chars in filenames

Wayne Davison wayned at samba.org
Mon Feb 7 20:45:07 GMT 2005


On Thu, Nov 25, 2004 at 11:27:58AM +0100, Paul Slootman wrote:
> Not all filenames that are printed are passed through safe_fname()
> AFAICS, e.g. a random piece of code from rsync.c:166 :

I looked at eliminating safe_fname() in favor of putting the filtering
into rwrite(), and there are a bunch of places that expect to be able
to output tabs and newlines as a part of the string.  So, I decided to
try to find all the places that didn't use either safe_fname() or
full_fname() (which calls safe_fname()) and fix them.  I've also checked
in an improvement to safe_fname() that makes it use isprint() (instead
of just looking for newlines).

..wayne..


More information about the rsync mailing list