(krb5_get_init_creds_password): init the creds_opt too. Reported by Hai Zaar.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21931 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1547,9 +1547,15 @@ krb5_get_init_creds_password(krb5_context context,
|
|||||||
char buf[BUFSIZ];
|
char buf[BUFSIZ];
|
||||||
krb5_error_code ret;
|
krb5_error_code ret;
|
||||||
|
|
||||||
if (in_options == NULL)
|
if (in_options == NULL) {
|
||||||
|
const char *realm = krb5_principal_get_realm(context, client);
|
||||||
ret = krb5_get_init_creds_opt_alloc(context, &options);
|
ret = krb5_get_init_creds_opt_alloc(context, &options);
|
||||||
else
|
if (ret == 0)
|
||||||
|
krb5_get_init_creds_opt_set_default_flags(context,
|
||||||
|
NULL,
|
||||||
|
realm,
|
||||||
|
options);
|
||||||
|
} else
|
||||||
ret = _krb5_get_init_creds_opt_copy(context, in_options, &options);
|
ret = _krb5_get_init_creds_opt_copy(context, in_options, &options);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user