diff options
author | Andrew Bartlett <abartlet@samba.org> | 2023-03-02 16:31:17 +1300 |
---|---|---|
committer | Jule Anger <janger@samba.org> | 2023-03-20 10:03:45 +0100 |
commit | 07fffb3e90621c47050929e3ca2232f5a222954e (patch) | |
tree | 1ab1c5286656764cff961c79348cd190788cea17 /source4 | |
parent | d148a7dd88d4bcc596225be2795fc969284dfd08 (diff) | |
download | samba-07fffb3e90621c47050929e3ca2232f5a222954e.tar.gz |
CVE-2023-0614 dsdb: Add DSDB_MARK_REQ_UNTRUSTED
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>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/common/util.c | 4 | ||||
-rw-r--r-- | source4/dsdb/common/util.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index b556f06cb63..39b29cd2a0c 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -4878,6 +4878,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; } diff --git a/source4/dsdb/common/util.h b/source4/dsdb/common/util.h index e1854644d53..5bb96d60b3c 100644 --- a/source4/dsdb/common/util.h +++ b/source4/dsdb/common/util.h @@ -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); |