the creation of a fifo (named pipe) is not a privileged function - at least on freebsd, linux and solaris. so it should not require root-privileges to be done. instead they should be copied like ordinary files, too.
this should apply to both fifos and sockets. creation of both are unprivileged operations, see mkfifo(2), socket(2)/bind(2) on freebsd. suggest moving/modifying do_mknod in these sections backup.c generator.c to run regardles of uid and simply complain and continue on platforms where those syscalls are restricted. just like if a regular file can't be read due to perm/uid: rsync: send_files failed to open "/tmp/a.out": Permission denied (13) any other eyes looking at this feature may wish to see related: http://lists.samba.org/archive/rsync/2003-October/007555.html http://lists.samba.org/archive/rsync/2002-June/002966.html http://www.mail-archive.com/rsync@lists.samba.org/msg00477.html reply to bugzilla/samba list only, thx.
Created attachment 1356 [details] patch, tweak to taste per comment allow nonroot to try do_mknod() for fifo/sock/block/char. if block/char failed due to nonroot perm denied [EPERM] in mknod(2): without -v, continue quietly, exit 0 with -v, continue verbosely, exit 0 printing for both is the official pre-patch behavior, so the user may wish to extend non-v with rsyserr(FINFO...) to match. actually, do_mknod's mknod() should be wrapped with similar if and rsyserr 'skipping' statements before call instead. applies to: cvs -D '2005-08-02 00:00:00-0000'. a little give back against the debt, enjoy;-]
Created attachment 1412 [details] Make special files copyable by non-root This patch divides what rsync considered "devices" into devices and specials, making it possible to control the copying of each category via options. For full compatibility when copying to/from an older rsync, the -D option still means "copy device-files and special-files". Also, the -a option still turns on the copying of both categories of files. However, since specials are now copied by non-root, this means that a user would need to specify "-a --no-specials" to turn this off (or "-a --no-D" as a non-root user would also do the same thing). Note that the --devices option now turns on just the copying of devices, so the user should use -D or "--devices --specials" for both. Finally, itemized output was extended to output special files with the letter "s" (separating them from devices, which output with the letter "D"). Comments?
The CVS version now has the separation of devices and special files as described earlier (with only minor tweaks from the aforementioned patch, such as specials being listed in the itemized output as "S", not "s" to help avoid confusion with the the size-is-different flag).