summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-03-05 01:22:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:55:54 -0500
commita5f84481e38ffc79043bfbac5f0353856b77b141 (patch)
tree998d6f505a1768ae060f83dceddaf0ece1e32660 /source3/auth
parent9d0a31e9638d118b04f96260b61fdd4370beab97 (diff)
downloadsamba-a5f84481e38ffc79043bfbac5f0353856b77b141.tar.gz
samba-a5f84481e38ffc79043bfbac5f0353856b77b141.tar.bz2
samba-a5f84481e38ffc79043bfbac5f0353856b77b141.zip
r5655: Added support for Novell NDS universal password. Code donated by
Vince Brimhall <vbrimhall@novell.com> - slight tidyup by me to use Samba conventions. Vince - thanks a *lot* for this code - please test to make sure I haven't messed anything up. Jeremy. (This used to be commit 6f5ea963abe8e19d17a1803d4bedd9d87a317e58)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_sam.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index 35f85f5e60..9da59f220a 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -232,6 +232,7 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context,
SAM_ACCOUNT *sampass=NULL;
BOOL ret;
NTSTATUS nt_status;
+ NTSTATUS update_login_attempts_status;
DATA_BLOB user_sess_key = data_blob(NULL, 0);
DATA_BLOB lm_sess_key = data_blob(NULL, 0);
BOOL updated_autolock = False, updated_badpw = False;
@@ -269,7 +270,12 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context,
nt_status = sam_password_ok(auth_context, mem_ctx, sampass,
user_info, &user_sess_key, &lm_sess_key);
-
+
+ /* Notify passdb backend of login success/failure. If not NT_STATUS_OK the backend doesn't like the login */
+ update_login_attempts_status = pdb_update_login_attempts(sampass, NT_STATUS_IS_OK(nt_status));
+ if (!NT_STATUS_IS_OK(update_login_attempts_status))
+ nt_status = update_login_attempts_status;
+
if (!NT_STATUS_IS_OK(nt_status)) {
if (NT_STATUS_EQUAL(nt_status,NT_STATUS_WRONG_PASSWORD) &&
pdb_get_acct_ctrl(sampass) &ACB_NORMAL) {