X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/5ebe9a46d7f3c846a6d665cb8c6ab8b79508a6df..bf4170ade8858608fbb7191eabaab996d61ba47e:/clientserver.c diff --git a/clientserver.c b/clientserver.c index afd2b179..8b6b896f 100644 --- a/clientserver.c +++ b/clientserver.c @@ -265,7 +265,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char if (strncmp(*argv, modname, modlen) == 0 && argv[0][modlen] == '\0') sargs[sargc++] = modname; /* we send "modname/" */ - else + else if (**argv == '-') { + if (asprintf(sargs + sargc++, "./%s", *argv) < 0) + out_of_memory("start_inband_exchange"); + } else sargs[sargc++] = *argv; argv++; argc--; @@ -512,7 +515,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char set_env_str("RSYNC_HOST_NAME", host); set_env_str("RSYNC_HOST_ADDR", addr); - if (!allow_access(addr, host, lp_hosts_allow(i), lp_hosts_deny(i))) { + if (!allow_access(addr, &host, i)) { rprintf(FLOG, "rsync denied on module %s from %s (%s)\n", name, host, addr); if (!lp_list(i))