CVE-2022-32746 s4/dsdb/partition: Fix LDB flags comparison
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 21 Jun 2022 02:41:02 +0000 (14:41 +1200)
committerJule Anger <janger@samba.org>
Wed, 27 Jul 2022 10:52:36 +0000 (10:52 +0000)
commitd178a0614057e75c957a77607df34ad81d8f1207
treea40ab2db1c31901cf2052d8e4bfb9a0e8bbd97a6
parent852a79c63c965b9861a1bd319948a51f116b7e9a
CVE-2022-32746 s4/dsdb/partition: Fix LDB flags comparison

LDB_FLAG_MOD_* values are not actually flags, and the previous
comparison was equivalent to

(req_msg->elements[el_idx].flags & LDB_FLAG_MOD_MASK) != 0

which is true whenever any of the LDB_FLAG_MOD_* values are set. Correct
the expression to what it was probably intended to be.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
source4/dsdb/samdb/ldb_modules/partition.c