From 009892846fb25e6698c8e38c46cae3512abb7ec6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 8 Nov 2004 02:01:05 +0000 Subject: r3610: prevent segv with heimdal and password krb5 init (This used to be commit a4598e7fa17c7ec0fed9cb81f5a0fb30b133861b) --- source4/libcli/auth/kerberos.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source4/libcli/auth') diff --git a/source4/libcli/auth/kerberos.c b/source4/libcli/auth/kerberos.c index d70444d5bc..224e4abbdc 100644 --- a/source4/libcli/auth/kerberos.c +++ b/source4/libcli/auth/kerberos.c @@ -61,14 +61,17 @@ kerb_prompter(krb5_context ctx, void *data, krb5_error_code code = 0; krb5_principal me; krb5_creds my_creds; + krb5_get_init_creds_opt options; if ((code = krb5_parse_name(ctx, principal, &me))) { return code; } - + + ZERO_STRUCT(options); + if ((code = krb5_get_init_creds_password(ctx, &my_creds, me, password, kerb_prompter, - NULL, 0, NULL, NULL))) { + NULL, 0, NULL, &options))) { krb5_free_principal(ctx, me); return code; } -- cgit