mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
CVE-2022-32746 ldb:rdn_name: Use LDB_FLAG_MOD_TYPE() for flags equality check
Now unrelated flags will no longer affect the result. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
This commit is contained in:
parent
0526d27e9e
commit
2869b5aa31
@ -545,7 +545,7 @@ static int rdn_name_modify(struct ldb_module *module, struct ldb_request *req)
|
||||
if (e != NULL) {
|
||||
ldb_asprintf_errstring(ldb, "Modify of 'distinguishedName' on %s not permitted, must use 'rename' operation instead",
|
||||
ldb_dn_get_linearized(req->op.mod.message->dn));
|
||||
if (e->flags == LDB_FLAG_MOD_REPLACE) {
|
||||
if (LDB_FLAG_MOD_TYPE(e->flags) == LDB_FLAG_MOD_REPLACE) {
|
||||
return LDB_ERR_CONSTRAINT_VIOLATION;
|
||||
} else {
|
||||
return LDB_ERR_UNWILLING_TO_PERFORM;
|
||||
|
Loading…
x
Reference in New Issue
Block a user