From: Wayne Davison Date: Fri, 27 Oct 2006 07:43:28 +0000 (+0000) Subject: - Fixed a bug I introduced into the daemon's "fake super" handling. X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/commitdiff_plain/611f9f3c5b35c77271c67ca9e63e675fc0ff4e91 - Fixed a bug I introduced into the daemon's "fake super" handling. - Make sure that the client can't send the daemon --fake-super. --- diff --git a/fake-super.diff b/fake-super.diff index 69a823c..1d5f8ac 100644 --- a/fake-super.diff +++ b/fake-super.diff @@ -61,16 +61,18 @@ After applying this patch, run these commands for a successful build: --- old/clientserver.c +++ new/clientserver.c -@@ -284,6 +284,9 @@ static int rsync_module(int f_in, int f_ - pid_t pre_exec_pid = 0; - char *request = NULL; +@@ -625,6 +625,11 @@ static int rsync_module(int f_in, int f_ + ret = parse_arguments(&argc, (const char ***) &argv, 0); + quiet = 0; /* Don't let someone try to be tricky. */ -+ if (lp_fake_super(i) != 0) ++ if (lp_fake_super(i)) + am_root = -1; ++ else if (am_root < 0) /* Treat --fake-super from client as --super. */ ++ am_root = 2; + - if (!allow_access(addr, host, lp_hosts_allow(i), lp_hosts_deny(i))) { - rprintf(FLOG, "rsync denied on module %s from %s (%s)\n", - name, host, addr); + if (filesfrom_fd == 0) + filesfrom_fd = f_in; + --- old/generator.c +++ new/generator.c @@ -1510,13 +1510,14 @@ void generate_files(int f_out, struct fi