]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
CVE-2021-20251 dsdb/common: Remove transaction logic from samdb_set_password()
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 2 Aug 2022 02:40:01 +0000 (14:40 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 12 Sep 2022 23:07:38 +0000 (23:07 +0000)
All of its callers, where necessary, take out a transaction covering the
entire password set or change operation, so a transaction is no longer
needed here.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14611

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/common/util.c

index aff31ac86516a5ab86a5808a02c9a0996135dc10..be0a2cd4a3325f117b5a46348cab2c5e4d2a1701 100644 (file)
@@ -2414,7 +2414,10 @@ static NTSTATUS samdb_set_password_internal(struct ldb_context *ldb, TALLOC_CTX
                return NT_STATUS_NO_MEMORY;
        }
 
-       ret = dsdb_autotransaction_request(ldb, req);
+       ret = ldb_request(ldb, req);
+       if (ret == LDB_SUCCESS) {
+               ret = ldb_wait(req->handle, LDB_WAIT_ALL);
+       }
 
        if (req->context != NULL) {
                struct ldb_control *control = talloc_get_type_abort(req->context,