From: Dmitry Timoshkov dmitry@baikal.ru
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/kerberos/krb5_ap.c | 2 +- dlls/kerberos/unixlib.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/kerberos/krb5_ap.c b/dlls/kerberos/krb5_ap.c index 5a5878faf02..a824c5d00c6 100644 --- a/dlls/kerberos/krb5_ap.c +++ b/dlls/kerberos/krb5_ap.c @@ -428,7 +428,7 @@ static NTSTATUS NTAPI kerberos_SpAcquireCredentialsHandle( goto done; } if (!(username = get_username_unixcp( id->User, id->UserLength, id->Domain, id->DomainLength ))) goto done; - if (!(password = get_password_unixcp( id->Password, id->PasswordLength ))) goto done; + if (id->Password && !(password = get_password_unixcp( id->Password, id->PasswordLength ))) goto done; }
if (!(cred_handle = calloc( 1, sizeof(*cred_handle) ))) diff --git a/dlls/kerberos/unixlib.c b/dlls/kerberos/unixlib.c index e5287140e3a..0ca76cc2fd9 100644 --- a/dlls/kerberos/unixlib.c +++ b/dlls/kerberos/unixlib.c @@ -605,7 +605,7 @@ static NTSTATUS init_creds( const char *user_at_domain, const char *password ) krb5_creds creds; krb5_error_code err;
- if (!user_at_domain) return STATUS_SUCCESS; + if (!user_at_domain || !password) return STATUS_SUCCESS; if ((err = p_krb5_init_context( &ctx ))) return krb5_error_to_status( err ); if ((err = p_krb5_parse_name_flags( ctx, user_at_domain, 0, &principal ))) goto done; if ((err = p_krb5_cc_default( ctx, &cache ))) goto done;