[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libpam-heimdal
Hello,
I can't get this to work anymore with Heimdal 0.3f. With debug
enabled, I get messages like:
Jun 19 20:28:55 scrooge login[28733]: pam_krb5: pam_sm_authenticate(login bam): entry:
Jun 19 20:29:01 scrooge login[11751]: pam_krb5: pam_sm_authenticate(login bam): entry:
Jun 19 20:29:55 scrooge login[2014]: pam_krb5: pam_sm_authenticate(login bam): entry:
and the system won't let me log in.
I have:
auth required pam_unix.so nullok
auth optional pam_krb5.so try_first_pass debug
in my pam file for login.
I adopted the patch file I had for Heimdal 0.3e, attached (is this
still required?), but it still doesn't work :-(
gdb of the login process says
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x400cc2ab in malloc () from /lib/libc.so.6
(gdb) bt
#0 0x400cc2ab in malloc () from /lib/libc.so.6
#1 0x400cb964 in malloc () from /lib/libc.so.6
#2 0x400c5712 in vasprintf () from /lib/libc.so.6
#3 0x401c85dd in krb5_vset_error_string () from /usr/lib/libkrb5.so.16
#4 0x401c85a1 in krb5_set_error_string () from /usr/lib/libkrb5.so.16
#5 0x401cef2e in krb5_kt_remove_entry () from /usr/lib/libkrb5.so.16
#6 0x401ceb46 in krb5_kt_start_seq_get () from /usr/lib/libkrb5.so.16
#7 0x401ce8d8 in krb5_kt_get_entry () from /usr/lib/libkrb5.so.16
#8 0x401ce775 in krb5_kt_read_service_key () from /usr/lib/libkrb5.so.16
#9 0x40190936 in verify_krb_v5_tgt () from /lib/security/pam_krb5.so
#10 0x4018f23e in pam_sm_authenticate () from /lib/security/pam_krb5.so
#11 0x4004e926 in pam_fail_delay () from /lib/libpam.so.0
#12 0x4004ebd4 in _pam_dispatch () from /lib/libpam.so.0
#13 0x400504be in pam_authenticate () from /lib/libpam.so.0
#14 0x804ad3e in strcpy ()
#15 0x4007838b in __libc_start_main () from /lib/libc.so.6
Any ideas?
diff -ruN heimdal-0.3f-old/lib/krb5/cache.c heimdal-0.3f/lib/krb5/cache.c
--- heimdal-0.3f-old/lib/krb5/cache.c Mon May 14 16:14:45 2001
+++ heimdal-0.3f/lib/krb5/cache.c Tue Jun 19 20:16:49 2001
@@ -99,13 +99,28 @@
{
krb5_error_code ret;
krb5_ccache p;
+ krb5_cc_ops *q;
p = malloc(sizeof(*p));
if(p == NULL) {
krb5_set_error_string(context, "malloc: out of memory");
return KRB5_CC_NOMEM;
}
- p->ops = ops;
+
+ q = malloc(sizeof(*q));
+ if(q == NULL) {
+ krb5_set_error_string(context, "malloc: out of memory");
+ return KRB5_CC_NOMEM;
+ }
+ memcpy(q, ops, sizeof(*q));
+ q->prefix = strdup(ops->prefix);
+ if(q->prefix == NULL) {
+ free(q);
+ krb5_set_error_string(context, "strdup: out of memory");
+ return KRB5_CC_NOMEM;
+ }
+
+ p->ops = q;
*id = p;
ret = p->ops->resolve(context, id, residual);
if(ret)
@@ -155,13 +170,28 @@
krb5_ccache *id)
{
krb5_ccache p;
+ krb5_cc_ops *q;
p = malloc (sizeof(*p));
if (p == NULL) {
krb5_set_error_string(context, "malloc: out of memory");
return KRB5_CC_NOMEM;
}
- p->ops = ops;
+
+ q = malloc(sizeof(*q));
+ if(q == NULL) {
+ krb5_set_error_string(context, "malloc: out of memory");
+ return KRB5_CC_NOMEM;
+ }
+ memcpy(q, ops, sizeof(*q));
+ q->prefix = strdup(ops->prefix);
+ if(q->prefix == NULL) {
+ free(q);
+ krb5_set_error_string(context, "strdup: out of memory");
+ return KRB5_CC_NOMEM;
+ }
+
+ p->ops = q;
*id = p;
return p->ops->gen_new(context, id);
}
@@ -264,6 +294,8 @@
{
krb5_error_code ret;
ret = id->ops->close(context, id);
+ free(id->ops->prefix);
+ free((krb5_cc_ops *)id->ops);
free(id);
return ret;
}
diff -ruN heimdal-0.3f-old/lib/krb5/cache.c.rej heimdal-0.3f/lib/krb5/cache.c.rej
--- heimdal-0.3f-old/lib/krb5/cache.c.rej Thu Jan 1 10:00:00 1970
+++ heimdal-0.3f/lib/krb5/cache.c.rej Tue Jun 19 20:10:36 2001
@@ -0,0 +1,76 @@
+***************
+*** 89,99 ****
+ {
+ krb5_error_code ret;
+ krb5_ccache p;
+
+ p = malloc(sizeof(*p));
+ if(p == NULL)
+ return KRB5_CC_NOMEM;
+- p->ops = ops;
+ *id = p;
+ ret = p->ops->resolve(context, id, residual);
+ if(ret)
+--- 89,112 ----
+ {
+ krb5_error_code ret;
+ krb5_ccache p;
++ krb5_cc_ops *q;
+
+ p = malloc(sizeof(*p));
+ if(p == NULL)
+ return KRB5_CC_NOMEM;
++
++ q = malloc(sizeof(*q));
++ if(q == NULL)
++ return KRB5_CC_NOMEM;
++ memcpy(q, ops, sizeof(*q));
++ q->prefix = strdup(ops->prefix);
++ if(q->prefix == NULL)
++ {
++ free(q);
++ return KRB5_CC_NOMEM;
++ }
++
++ p->ops = q;
+ *id = p;
+ ret = p->ops->resolve(context, id, residual);
+ if(ret)
+***************
+*** 141,151 ****
+ krb5_ccache *id)
+ {
+ krb5_ccache p;
+
+ p = malloc (sizeof(*p));
+ if (p == NULL)
+ return KRB5_CC_NOMEM;
+- p->ops = ops;
+ *id = p;
+ return p->ops->gen_new(context, id);
+ }
+--- 154,177 ----
+ krb5_ccache *id)
+ {
+ krb5_ccache p;
++ krb5_cc_ops *q;
+
+ p = malloc (sizeof(*p));
+ if (p == NULL)
+ return KRB5_CC_NOMEM;
++
++ q = malloc(sizeof(*q));
++ if(q == NULL)
++ return KRB5_CC_NOMEM;
++ memcpy(q, ops, sizeof(*q));
++ q->prefix = strdup(ops->prefix);
++ if(q->prefix == NULL)
++ {
++ free(q);
++ return KRB5_CC_NOMEM;
++ }
++
++ p->ops = q;
+ *id = p;
+ return p->ops->gen_new(context, id);
+ }
--
Brian May <bam@snoopy.apana.org.au>