[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GSSAPI & non-default keytab file
> This isn't right. GSS_C_NO_CREDENTIAL is NULL, so dereferencing it
> will cause problems.
Oh, I missed it. This one should be better:
Index: lib/gssapi/accept_sec_context.c
===================================================================
RCS file: /pkg/maint/cvs/heimdal/lib/gssapi/accept_sec_context.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 accept_sec_context.c
--- lib/gssapi/accept_sec_context.c 2000/10/08 19:09:36 1.1.1.2
+++ lib/gssapi/accept_sec_context.c 2000/11/22 23:56:29
@@ -41,6 +41,9 @@
gsskrb5_register_acceptor_identity (char *identity)
{
char *p;
+
+ gssapi_krb5_init ();
+
if(gss_keytab != NULL) {
krb5_kt_close(gssapi_krb5_context, gss_keytab);
gss_keytab = NULL;
@@ -189,12 +192,12 @@
goto failure;
}
- if (acceptor_cred_handle == GSS_C_NO_CREDENTIAL) {
- if (gss_keytab != NULL) {
- keytab = gss_keytab;
- }
- } else if (acceptor_cred_handle->keytab != NULL) {
- keytab = acceptor_cred_handle->keytab;
+ if (acceptor_cred_handle != GSS_C_NO_CREDENTIAL) {
+ keytab = acceptor_cred_handle->keytab;
+ }
+
+ if (keytab == NULL) {
+ keytab = gss_keytab;
}
kret = krb5_rd_req (gssapi_krb5_context,
--
Gabor Gombas Eotvos Lorand University
E-mail: gombasg@inf.elte.hu Hungary