summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-08-14 17:11:40 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-08-14 18:48:20 +0200
commit07af3f289e403396a9ddef744cf42e2badc1f1cc (patch)
tree2ecbdb0e240c4ef8fe41d0370d052d4a4d38eab7
parent1fa9e994423b96cc6a13682f79e827cae6850553 (diff)
downloadsamba-07af3f289e403396a9ddef744cf42e2badc1f1cc.tar.gz
samba-07af3f289e403396a9ddef744cf42e2badc1f1cc.tar.bz2
samba-07af3f289e403396a9ddef744cf42e2badc1f1cc.zip
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.
-rw-r--r--source4/dsdb/common/util.c2
1 files changed, 2 insertions, 0 deletions
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 {