Close the socket fds in the "post-xfer exec" process.
authorWayne Davison <wayned@samba.org>
Sat, 19 Jun 2010 17:49:43 +0000 (10:49 -0700)
committerWayne Davison <wayned@samba.org>
Sat, 19 Jun 2010 17:50:28 +0000 (10:50 -0700)
clientserver.c

index 878254f..469371f 100644 (file)
@@ -686,6 +686,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
                                return -1;
                        }
                        if (pid) {
                                return -1;
                        }
                        if (pid) {
+                               close(f_in);
+                               if (f_out != f_in)
+                                       close(f_out);
                                set_env_num("RSYNC_PID", (long)pid);
                                if (wait_process(pid, &status, 0) < 0)
                                        status = -1;
                                set_env_num("RSYNC_PID", (long)pid);
                                if (wait_process(pid, &status, 0) < 0)
                                        status = -1;