X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/c8fa85b23bfebc68f0ab2e0464937f5ee4a8bf69..d23cc156aa36135a2970321873798d35626d477b:/clientserver.c diff --git a/clientserver.c b/clientserver.c index 88f341e8..eeaf8e15 100644 --- a/clientserver.c +++ b/clientserver.c @@ -339,7 +339,7 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char if (protocol_version < 23) { if (protocol_version == 22 || !am_sender) - io_start_multiplex_in(); + io_start_multiplex_in(f_in); } free(modname); @@ -801,7 +801,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char } if (set_uid) { - if (setuid(uid)) { + if (setuid(uid) || seteuid(uid)) { rsyserr(FLOG, errno, "setuid %ld failed", (long)uid); io_printf(f_out, "@ERROR: setuid failed\n"); return -1; @@ -885,7 +885,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char if (protocol_version < 23 && (protocol_version == 22 || am_sender)) - io_start_multiplex_out(); + io_start_multiplex_out(f_out); else if (!ret || err_msg) { /* We have to get I/O multiplexing started so that we can * get the error back to the client. This means getting @@ -909,7 +909,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char if (files_from) write_byte(f_out, 0); } - io_start_multiplex_out(); + io_start_multiplex_out(f_out); } if (!ret || err_msg) {