From 191bbb979ebb8b6eb789377e359448cc244d2c59 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Jun 28 2018 07:24:57 +0000 Subject: Drop the unused locks --- diff --git a/openssh-7.7p1-gssapi-new-unique.patch b/openssh-7.7p1-gssapi-new-unique.patch index 3da318e..7acc58a 100644 --- a/openssh-7.7p1-gssapi-new-unique.patch +++ b/openssh-7.7p1-gssapi-new-unique.patch @@ -57,7 +57,7 @@ index a5a81ed2..63f877f2 100644 do_pam_putenv("KRB5CCNAME", authctxt->krb5_ccname); #endif -@@ -222,10 +223,59 @@ auth_krb5_password(Authctxt *authctxt, const char *password) +@@ -222,11 +223,54 @@ auth_krb5_password(Authctxt *authctxt, const char *password) void krb5_cleanup_proc(Authctxt *authctxt) { @@ -72,15 +72,12 @@ index a5a81ed2..63f877f2 100644 + krb5_ccache ccache; + int ret; + -+ /* Avoid race conditions with other processes touching the same collection */ -+ //krb5_cccol_lock(ctx); -+ + krb5_cc_destroy(ctx, authctxt->krb5_fwd_ccache); authctxt->krb5_fwd_ccache = NULL; + + ret = krb5_cccol_cursor_new(ctx, &cursor); + if (ret) -+ goto unlock; ++ goto out; + + ret = krb5_cccol_cursor_next(ctx, cursor, &ccache); + if (ret == 0 && ccache != NULL) { @@ -110,14 +107,12 @@ index a5a81ed2..63f877f2 100644 + } + } + } -+unlock: + krb5_cccol_cursor_free(ctx, &cursor); -+ -+ /* Release lock */ -+ //krb5_cccol_unlock(ctx); } ++out: if (authctxt->krb5_user) { krb5_free_principal(authctxt->krb5_ctx, authctxt->krb5_user); + authctxt->krb5_user = NULL; @@ -237,36 +287,186 @@ krb5_cleanup_proc(Authctxt *authctxt) } }