]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
CVE-2023-0614 dsdb: Add DSDB_MARK_REQ_UNTRUSTED
authorAndrew Bartlett <abartlet@samba.org>
Thu, 2 Mar 2023 03:31:17 +0000 (16:31 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 5 Apr 2023 02:10:35 +0000 (02:10 +0000)
This will allow our dsdb helper search functions to mark the new
request as untrusted, forcing read ACL evaluation (per current behaviour).

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

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

index 7dfdf2680b178b292213c8044d964ae39ee5c3b2..ef42d71ae04e6c463f7467608b1a8dc606e6f8f3 100644 (file)
@@ -4909,6 +4909,10 @@ int dsdb_request_add_controls(struct ldb_request *req, uint32_t dsdb_flags)
                }
        }
 
+       if (dsdb_flags & DSDB_MARK_REQ_UNTRUSTED) {
+               ldb_req_mark_untrusted(req);
+       }
+
        return LDB_SUCCESS;
 }
 
index e1854644d53cd03c22c578876df7f928920c3825..5bb96d60b3cca2208bdb3acdc125d08ea7bcf7a2 100644 (file)
@@ -43,6 +43,7 @@
 #define DSDB_MODIFY_PARTIAL_REPLICA          0x04000
 #define DSDB_PASSWORD_BYPASS_LAST_SET         0x08000
 #define DSDB_REPLMD_VANISH_LINKS              0x10000
+#define DSDB_MARK_REQ_UNTRUSTED               0x20000
 
 bool is_attr_in_list(const char * const * attrs, const char *attr);