NetBSD-Bugs archive

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

Re: lib/57631: pam_krb5.so seemingly randomly segfaults post the June update



Well, that's embarrassing.  Please try the attached patch?
diff --git a/lib/libpam/modules/pam_krb5/pam_krb5.c b/lib/libpam/modules/pam_krb5/pam_krb5.c
index 38dd77472149..48941317285b 100644
--- a/lib/libpam/modules/pam_krb5/pam_krb5.c
+++ b/lib/libpam/modules/pam_krb5/pam_krb5.c
@@ -955,6 +955,7 @@ verify_krb_v5_tgt_begin(krb5_context context, char *pam_service, int debug,
 	const char *services[3], **service;
 
 	*servicep = NULL;
+	*princp = NULL;
 
 	if (debug)
 		openlog_r("pam_krb5", LOG_PID, LOG_AUTHPRIV, datap);
@@ -996,6 +997,8 @@ verify_krb_v5_tgt_begin(krb5_context context, char *pam_service, int debug,
 		    &keyblock);
 		if (retval != 0)
 			continue;
+		*servicep = *service;
+		*princp = princ;
 		break;
 	}
 	if (keyblock)


Home | Main Index | Thread Index | Old Index