Bugzilla – Attachment 2082 Details for
Bug 1936
-A command not available from ~C
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Allow agent forwarding to be toggled off
openssh-agentfwd-disable.patch (text/plain), 2.43 KB, created by
Darren Tucker
on 2011-09-12 09:16:49 AEST
(
hide
)
Description:
Allow agent forwarding to be toggled off
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2011-09-12 09:16:49 AEST
Size:
2.43 KB
patch
obsolete
>Index: clientloop.c >=================================================================== >RCS file: /cvs/openssh/clientloop.c,v >retrieving revision 1.225 >diff -u -p -r1.225 clientloop.c >--- clientloop.c 22 Jun 2011 22:31:58 -0000 1.225 >+++ clientloop.c 11 Sep 2011 23:11:12 -0000 >@@ -152,6 +152,7 @@ static int escape_pending1; /* Last char > static int last_was_cr; /* Last character was a newline. */ > static int exit_status; /* Used to store the command exit status. */ > static int stdin_eof; /* EOF has been encountered on stderr. */ >+static int agent_disabled = 0; /* Agent forwarding disabled during session */ > static Buffer stdin_buffer; /* Buffer for stdin data. */ > static Buffer stdout_buffer; /* Buffer for stdout data. */ > static Buffer stderr_buffer; /* Buffer for stderr data. */ >@@ -1038,6 +1039,21 @@ process_escapes(Channel *c, Buffer *bin, > /* We have been continued. */ > continue; > >+ case 'A': >+ if (options.forward_agent) { >+ agent_disabled = 1; >+ options.forward_agent = 0; >+ snprintf(string, sizeof(string), >+ "%ca [agent forwarding disabled]\r\n", >+ escape_char); >+ } else { >+ snprintf(string, sizeof(string), >+ "%ca [agent already disabled]\r\n", >+ escape_char); >+ } >+ buffer_append(berr, string, strlen(string)); >+ continue; >+ > case 'B': > if (compat20) { > snprintf(string, sizeof string, >@@ -1119,6 +1135,7 @@ process_escapes(Channel *c, Buffer *bin, > "%c?\r\n\ > Supported escape sequences:\r\n\ > %c. - terminate session\r\n\ >+ %cA - disable agent forwarding\r\n\ > %cB - send a BREAK to the remote system\r\n\ > %cR - Request rekey (SSH protocol 2 only)\r\n\ > %c# - list forwarded connections\r\n\ >@@ -1128,7 +1145,8 @@ Supported escape sequences:\r\n\ > escape_char, escape_char, > escape_char, escape_char, > escape_char, escape_char, >- escape_char, escape_char); >+ escape_char, escape_char, >+ escape_char); > } else { > snprintf(string, sizeof string, > "%c?\r\n\ >@@ -1889,7 +1907,10 @@ client_input_channel_open(int type, u_in > } else if (strcmp(ctype, "x11") == 0) { > c = client_request_x11(ctype, rchan); > } else if (strcmp(ctype, "auth-agent@openssh.com") == 0) { >- c = client_request_agent(ctype, rchan); >+ if (agent_disabled) >+ debug("Agent authentication request, but agent forwarding disabled"); >+ else >+ c = client_request_agent(ctype, rchan); > } > /* XXX duplicate : */ > if (c != NULL) {
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 1936
: 2082