summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-12-13 11:30:13 +0000
committerAndrew Tridgell <tridge@samba.org>2001-12-13 11:30:13 +0000
commitd58b1b5981652e5ef37eb8d07ae3ff7797b112c5 (patch)
treeee5b565bb6f015b74d2f9418047305b8b3b380ec /source3
parent75a6ac48a0a2fb5285fd7d92fed770cacc0d400f (diff)
downloadsamba-d58b1b5981652e5ef37eb8d07ae3ff7797b112c5.tar.gz
samba-d58b1b5981652e5ef37eb8d07ae3ff7797b112c5.tar.bz2
samba-d58b1b5981652e5ef37eb8d07ae3ff7797b112c5.zip
better error handling
(This used to be commit ed6279481bfcb21212e9c22009969c19ea4f1646)
Diffstat (limited to 'source3')
-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);