Fix significant security holes with "use chroot = no" in an rsync daemon:
authorDavid Dykstra <dwd@samba.org>
Fri, 9 Jul 1999 15:49:46 +0000 (15:49 +0000)
committerDavid Dykstra <dwd@samba.org>
Fri, 9 Jul 1999 15:49:46 +0000 (15:49 +0000)
commitcb13abfed024d0320c0aa865ad652c946321df3c
tree087a42ec8b5e08ce8ede1da053421cf6999c4222
parent0503f06089b89aa4166d6ced8d5901ad6a112c41
Fix significant security holes with "use chroot = no" in an rsync daemon:

    1. The file paths being sent and received were not "sanitized" to
ensure that there weren't any ".." components that would escape the
top level directory.  This can't happen with the standard rsync
client, but it could be exploited on both read and write if someone
modified an rsync client.  This fix sanitizes all incoming and
outgoing paths when "use chroot = no".

    2. If a module is also "read only = no", clients could have created
symbolic links with ".." components that would allow writing
outside of the module.  This could happen with the standard rsync
client.  This fix sanitizes all incoming symbolic link targets
when "use chroot = no".

Previously, only top-level paths (anything passed in command line arguments)
were sanitized.  Sorry, I didn't think about the individual file paths
before now.
clientserver.c
flist.c
util.c