[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] server: Fix ssh_execute_server_callbacks() client execution


When the public key auth handler is executed and returns SSH_OK,
ssh_execute_server_callbacks() still runs some client callbacks,
which may set rc to SSH_AGAIN, which triggers a default reply on
auth, denying auth.

Signed-off-by: Nicolas Viennot <nicolas@xxxxxxxxxxx>
---
 src/messages.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/messages.c b/src/messages.c
index c8e0e09..c5783a6 100644
--- a/src/messages.c
+++ b/src/messages.c
@@ -312,7 +312,7 @@ static int
ssh_execute_server_callbacks(ssh_session session, ssh_message msg){
     }

     /* This one is in fact a client callback... */
-    if (session->common.callbacks != NULL) {
+    else if (session->common.callbacks != NULL) {
         rc = ssh_execute_client_request(session, msg);
     }

-- 
1.8.3.2

Follow-Ups:
Re: [PATCH] server: Fix ssh_execute_server_callbacks() client executionAndreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org