summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-05-04 23:44:50 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-08-14 11:58:13 +1000
commit4f8ef205ac05cfb445e1252b02faccf9f442f1c3 (patch)
tree557cca302ae162f5586414c6ad7a971823d960ef /source3
parent70211ea6a3517cb64f18fe7768078e7d51c51ca1 (diff)
downloadsamba-4f8ef205ac05cfb445e1252b02faccf9f442f1c3.tar.gz
samba-4f8ef205ac05cfb445e1252b02faccf9f442f1c3.tar.bz2
samba-4f8ef205ac05cfb445e1252b02faccf9f442f1c3.zip
s3:auth Add error paths for invalid password_state values
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_server.c3
-rw-r--r--source3/auth/auth_wbc.c5
-rw-r--r--source3/auth/check_samsec.c4
3 files changed, 10 insertions, 2 deletions
diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c
index 76cafc6d69..b5954e6a4d 100644
--- a/source3/auth/auth_server.c
+++ b/source3/auth/auth_server.c
@@ -410,6 +410,9 @@ use this machine as the password server.\n"));
(char *)user_info->password.response.nt.data,
user_info->password.response.nt.length,
user_info->mapped.domain_name);
+ default:
+ DEBUG(0,("user_info constructed for user '%s' was invalid - password_state=%u invalid.\n",user_info->mapped.account_name, user_info->password_state));
+ nt_status = NT_STATUS_INTERNAL_ERROR;
}
if (!NT_STATUS_IS_OK(nt_status)) {
diff --git a/source3/auth/auth_wbc.c b/source3/auth/auth_wbc.c
index e4fffc7cf8..6beec73456 100644
--- a/source3/auth/auth_wbc.c
+++ b/source3/auth/auth_wbc.c
@@ -95,8 +95,11 @@ static NTSTATUS check_wbc_security(const struct auth_context *auth_context,
params.password.response.nt_data = user_info->password.response.nt.data;
params.password.response.lm_length = user_info->password.response.lanman.length;
params.password.response.lm_data = user_info->password.response.lanman.data;
+ default:
+ DEBUG(0,("user_info constructed for user '%s' was invalid - password_state=%u invalid.\n",user_info->mapped.account_name, user_info->password_state));
+ return NT_STATUS_INTERNAL_ERROR;
}
-#if 0
+#if 0 /* If ever implemented in libwbclient */
case AUTH_PASSWORD_HASH:
{
DEBUG(3,("Checking logon (hash) password for %s.\n",
diff --git a/source3/auth/check_samsec.c b/source3/auth/check_samsec.c
index 46e05aa0c2..3b2f471812 100644
--- a/source3/auth/check_samsec.c
+++ b/source3/auth/check_samsec.c
@@ -102,8 +102,10 @@ static NTSTATUS sam_password_ok(TALLOC_CTX *mem_ctx,
lm_hash,
nt_hash,
user_sess_key, lm_sess_key);
+ default:
+ DEBUG(0,("user_info constructed for user '%s' was invalid - password_state=%u invalid.\n", username, user_info->password_state));
+ return NT_STATUS_INTERNAL_ERROR;
}
- return NT_STATUS_INVALID_PARAMETER;
}
/****************************************************************************