Bugzilla – Attachment 2900 Details for
Bug 2642
[sshconnect2] publickey authentication only properly works if used first: pubkey_prepare doesn't work after pubkey_cleanup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Only reset 'tried' count (on reset) and 'isprivate' (when freeing key)
stripped-down.patch (text/plain), 1.15 KB, created by
Vincent Brillault
on 2016-12-02 20:47:16 AEDT
(
hide
)
Description:
Only reset 'tried' count (on reset) and 'isprivate' (when freeing key)
Filename:
MIME Type:
Creator:
Vincent Brillault
Created:
2016-12-02 20:47:16 AEDT
Size:
1.15 KB
patch
obsolete
>diff --git a/sshconnect2.c b/sshconnect2.c >index 7a8b7ea..e4d2c95 100644 >--- a/sshconnect2.c >+++ b/sshconnect2.c >@@ -318,6 +318,7 @@ void userauth(Authctxt *, char *); > static int sign_and_send_pubkey(Authctxt *, Identity *); > static void pubkey_prepare(Authctxt *); > static void pubkey_cleanup(Authctxt *); >+static void pubkey_reset(Authctxt *); > static Key *load_identity_file(Identity *); > > static Authmethod *authmethod_get(char *authlist); >@@ -560,8 +561,7 @@ input_userauth_failure(int type, u_int32_t seq, void *ctxt) > if (partial != 0) { > verbose("Authenticated with partial success."); > /* reset state */ >- pubkey_cleanup(authctxt); >- pubkey_prepare(authctxt); >+ pubkey_reset(authctxt); > } > debug("Authentications that can continue: %s", authlist); > >@@ -1414,6 +1414,15 @@ pubkey_cleanup(Authctxt *authctxt) > } > } > >+static void >+pubkey_reset(Authctxt *authctxt) >+{ >+ Identity *id; >+ >+ TAILQ_FOREACH(id, &authctxt->keys, next) >+ id->tried = 0; >+} >+ > static int > try_identity(Identity *id) > { >@@ -1462,6 +1471,7 @@ userauth_pubkey(Authctxt *authctxt) > } > key_free(id->key); > id->key = NULL; >+ id->isprivate = 0; > } > } > if (sent)
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
Flags:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 2642
:
2895
|
2897
|
2898
| 2900