From 07af3f289e403396a9ddef744cf42e2badc1f1cc Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sat, 14 Aug 2010 17:11:40 +0200 Subject: s4:samdb_set_password - return "NT_STATUS_WRONG_PASSWORD" when a user account doesn't exist This is for the (SAMR) account detection protection mechanism. --- source4/dsdb/common/util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index 7c5fd8a1b4..be8e3a9d11 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -2147,6 +2147,8 @@ NTSTATUS samdb_set_password(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, status = NT_STATUS_WRONG_PASSWORD; } else if (ret == LDB_ERR_CONSTRAINT_VIOLATION) { status = NT_STATUS_PASSWORD_RESTRICTION; + } else if (ret == LDB_ERR_NO_SUCH_OBJECT) { + status = NT_STATUS_WRONG_PASSWORD; } else if (ret != LDB_SUCCESS) { status = NT_STATUS_UNSUCCESSFUL; } else { -- cgit