Clearing credentials question

Markus Moeller huaraz at moeller.plus.com
Thu Jan 6 18:04:15 EST 2011


Hi

I have the following little program which seg faults when calling 
krb5_free_cred_contents.  The error seems to come from 
krb5_free_keyblock_contents(context, &val->keyblock);  Shouldn't 
krb5_free_keyblock_contents check if the content is not zero ?

Thank you
Markus


#include <krb5.h>

int main() {

krb5_context context = NULL;
krb5_principal client;
krb5_principal server;
krb5_creds  creds;

char *cclient="markus at SUSE.HOME";
char *cserver="krbtgt/SUSE.HOME at SUSE.HOME";

krb5_error_code code = 0;

code = krb5_init_context(&context);

code = krb5_parse_name(context, cclient, &creds.client);
code = krb5_parse_name(context, cserver, &creds.server);

krb5_free_cred_contents(context, &creds);

}


(gdb) where
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb7d9d7ff in raise () from /lib/libc.so.6
#2  0xb7d9f140 in abort () from /lib/libc.so.6
#3  0xb7dd9fd7 in __libc_message () from /lib/libc.so.6
#4  0xb7ddfffb in malloc_printerr () from /lib/libc.so.6
#5  0xb7de07ce in munmap_chunk () from /lib/libc.so.6
#6  0xb7f31940 in krb5_free_cred_contents (context=0x804b058, 
val=0xbffff43c) at kfree.c:202
#7  0x08048657 in main () at testcreds.c:20






More information about the Kerberos mailing list