s4:samdb_set_password - return "NT_STATUS_WRONG_PASSWORD" when a user account doesn...
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Sat, 14 Aug 2010 15:11:40 +0000 (17:11 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Sat, 14 Aug 2010 16:48:20 +0000 (18:48 +0200)
This is for the (SAMR) account detection protection mechanism.

source4/dsdb/common/util.c

index 7c5fd8a1b48ef000c5bbd510a2f989ccaff8311e..be8e3a9d11c2235dec7ac2142083dd3765c0ae3e 100644 (file)
@@ -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 {