Bugzilla – Attachment 1229 Details for
Bug 1261
Timed out command through ControlMaster yields 0 return value.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
don't return success when master exits unexpectedly
sshmuxexit.diff (text/plain), 1.23 KB, created by
Damien Miller
on 2007-01-22 13:45:13 AEDT
(
hide
)
Description:
don't return success when master exits unexpectedly
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2007-01-22 13:45:13 AEDT
Size:
1.23 KB
patch
obsolete
>Index: ssh.c >=================================================================== >RCS file: /var/cvs/openssh/ssh.c,v >retrieving revision 1.286 >diff -u -r1.286 ssh.c >--- ssh.c 5 Jan 2007 05:30:17 -0000 1.286 >+++ ssh.c 22 Jan 2007 02:42:51 -0000 >@@ -1458,24 +1458,29 @@ > > /* Stick around until the controlee closes the client_fd */ > exitval = 0; >- for (;!control_client_terminate;) { >+ for (i = 0; !control_client_terminate && i < (int)sizeof(exitval);) { > r = read(sock, &exitval, sizeof(exitval)); > if (r == 0) { > debug2("Received EOF from master"); > break; > } >- if (r > 0) >+ if (r > 0) { > debug2("Received exit status from master %d", exitval); >+ i += r; >+ } > if (r == -1 && errno != EINTR) > fatal("%s: read %s", __func__, strerror(errno)); > } >- >- if (control_client_terminate) >- debug2("Exiting on signal %d", control_client_terminate); >- > close(sock); >- > leave_raw_mode(); >+ >+ if (control_client_terminate) { >+ debug2("Exiting on signal %d", control_client_terminate); >+ exitval = 255; >+ } else if (i < (int)sizeof(exitval)) { >+ debug2("Control master terminated unexpectedly"); >+ exitval = 255; >+ } > > if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) > fprintf(stderr, "Connection to master closed.\r\n");
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1261
: 1229