Skip to content

Commit 19059f2

Browse files
committed
auth-agent awaits a response in putty
1 parent 53372ec commit 19059f2

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ You can find more examples in the `examples` directory of this repository.
950950

951951
* **name** - _string_ - The signal name (e.g. `SIGUSR1`).
952952

953-
* **auth-agent**(< _mixed_ >accept, < _mixed_ >reject) - The client has requested incoming ssh-agent requests be forwarded to them. `accept` and `reject` are functions if the client requested a response. `accept(< _function_ >callback)` will trigger `callback` with 2 parameters: < _Error_ >err, < _Channel_ >agentStream.
953+
* **auth-agent**(< _mixed_ >accept, < _mixed_ >reject) - The client has requested incoming ssh-agent requests be forwarded to them. `accept` and `reject` are functions if the client requested a response.
954954

955955
* **shell**(< _mixed_ >accept, < _mixed_ >reject) - The client has requested an interactive shell. `accept` and `reject` are functions if the client requested a response. `accept()` returns a _Channel_ for the interactive shell. `reject()` Returns `false` if you should wait for the `continue` event before sending any more traffic.
956956

lib/server.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -799,17 +799,9 @@ function Session(client, info, localChan) {
799799
break;
800800
// XXX: is `auth-agent-req@openssh.com` really "post-real session start"?
801801
case 'auth-agent-req@openssh.com':
802-
if (listenerCount(self, 'auth-agent')) {
803-
accept = function(cb) {
804-
if (replied || ending)
805-
return;
806-
807-
replied = true;
808-
809-
return client.openssh_authAgent(cb);
810-
};
802+
if (listenerCount(self, 'auth-agent'))
811803
self.emit('auth-agent', accept, reject);
812-
} else
804+
else
813805
reject && reject();
814806
break;
815807
// "real session start" requests

0 commit comments

Comments
 (0)