summaryrefslogtreecommitdiff
path: root/source3/libads/kerberos.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libads/kerberos.c')
-rw-r--r--source3/libads/kerberos.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c
index 5d7b08a348..8378442885 100644
--- a/source3/libads/kerberos.c
+++ b/source3/libads/kerberos.c
@@ -35,7 +35,12 @@ int kerberos_kinit_password(const char *principal, const char *password,
krb5_ccache cc;
krb5_principal me;
krb5_creds my_creds;
-
+
+ if (! *password) {
+ /* kerberos dies on an empty password! */
+ return KRB5_PARSE_MALFORMED;
+ }
+
if ((code = krb5_init_context(&ctx)))
return code;
@@ -103,7 +108,7 @@ int ads_kinit_password(ADS_STRUCT *ads)
ret = kerberos_kinit_password(s, ads->password, 0);
if (ret) {
- DEBUG(1,("kerberos_kinit_password %s failed: %s\n",
+ DEBUG(0,("kerberos_kinit_password %s failed: %s\n",
s, error_message(ret)));
}
free(s);