On Wednesday 29 June 2005 13:40, Russell Howe wrote: > Kern Sibbald wrote: > > On Wednesday 29 June 2005 11:47, Russell Howe wrote: > >>Kern, find(1) can output null-terminated strings, which may help when > >>there are files with weird names. Would it be possible for bacula to > >>somehow support this format of output? I guess it may be useful... > > > > Sorry, but I'm not sure about what you would like supported. Could you be > > more specific, perhaps with an example? > > If you do File = "|foo" > > The bacula expects the command 'foo' to produce a list of files, > separated by newlines, according to the docs. > > GNU find (not sure about others) has a -print0 option, which produces a > \0-separated list of files. This is typically used with xargs' -0 option. > > Since it's possible to create files with a \n in the filename (at least > on my XFS and NFS-mounted ext3 filesystems here), doesn't this open up > the possibility for bacula to get rather confused? > > On the other hand, creating a file with a \0 in its name is pretty > difficult (if not impossible - filenames are null-terminated, no?). > > So, from what I can see, someone with permission to create or rename > files can really confuse bacula about which files to back up. > > I don't think filenames with \n's in them are really a problem, as you'd > end up with a situation something like this > > /tmp/foo\nbar > > would give > > /tmp/foo > bar > > and I guess bacula wouldn't like the non-absolute path 'bar'. > > But a directory, e.g. > > /tmp/foo\n/proc > > would cause bacula to back up /tmp/foo and /proc, no? > > It's a corner case, admittedly, but could it not be a potential DoS? A > user could make bacula back up something big and fill the storage device.
OK, I see what you mean. I guess my reaction is that if someone really wants \n s in their filenames (i.e. is crazy enough), then I prefer that they write their own little script that encloses the names in quotes then Bacula should handle them fine. -- Best regards, Kern ("> /\ V_V ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users