--- samba-3.5.3.orig/source3/client/client.c 2011-09-29 09:34:53.000000000 +0200 +++ samba-3.5.3/source3/client/client.c 2011-09-29 12:02:42.000000000 +0200 @@ -1606,6 +1606,7 @@ char *targetname = NULL; struct push_state state; NTSTATUS status; + int orig_max_mux; if (!cli_resolve_path(ctx, "", auth_info, cli, rname, &targetcli, &targetname)) { d_printf("Failed to open %s: %s\n", rname, cli_errstr(cli)); @@ -1639,6 +1640,8 @@ than returning. */ if (!strcmp(lname, "-")) { f = x_stdin; + orig_max_mux = targetcli->max_mux; + targetcli->max_mux = 1; /* size of file is not known */ } else { f = x_fopen(lname,O_RDONLY, 0); @@ -1670,6 +1673,10 @@ d_fprintf(stderr, "cli_push returned %s\n", nt_errstr(status)); } + if (f == x_stdin) { + targetcli->max_mux = orig_max_mux; + } + if (!NT_STATUS_IS_OK(cli_close(targetcli, fnum))) { d_printf("%s closing remote file %s\n",cli_errstr(cli),rname); if (f != x_stdin) {