X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/eecd22ff7b041c6dc3cd5ff517aef64d2b69607c..b52c1d9d3aec51afbc9d1c5561d2b70d8bcecf54:/clientserver.c diff --git a/clientserver.c b/clientserver.c index 7dd72e9b..84858861 100644 --- a/clientserver.c +++ b/clientserver.c @@ -244,6 +244,18 @@ static int rsync_module(int fd, int i) log_init(); if (use_chroot) { + /* + * XXX: The 'use chroot' flag is a fairly reliable + * source of confusion, because it fails under two + * important circumstances: running as non-root, + * running on Win32 (or possibly others). On the + * other hand, if you are running as root, then it + * might be better to always use chroot. + * + * So, perhaps if we can't chroot we should just issue + * a warning, unless a "require chroot" flag is set, + * in which case we fail. + */ if (chroot(lp_path(i))) { rsyserr(FERROR, errno, "chroot %s failed", lp_path(i)); io_printf(fd,"@ERROR: chroot failed\n");