diff options
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/ldb/include/ldb.h | 5 | ||||
-rw-r--r-- | source4/lib/registry/ldb.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h index f3ec1ed606..6625d94dbd 100644 --- a/source4/lib/ldb/include/ldb.h +++ b/source4/lib/ldb/include/ldb.h @@ -110,6 +110,11 @@ struct ldb_dn; #define LDB_FLAG_MOD_MASK 0x3 /** + use this to extract the mod type from the operation + */ +#define LDB_FLAG_MOD_TYPE(flags) ((flags) & LDB_FLAG_MOD_MASK) + +/** Flag value used in ldap_modify() to indicate that attributes are being added. diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c index c14ee70ace..91c6763902 100644 --- a/source4/lib/registry/ldb.c +++ b/source4/lib/registry/ldb.c @@ -830,7 +830,7 @@ static WERROR ldb_set_value(struct hive_key *parent, if (ret == LDB_ERR_NO_SUCH_OBJECT) { i = 0; while (i < msg->num_elements) { - if (msg->elements[i].flags == LDB_FLAG_MOD_DELETE) { + if (LDB_FLAG_MOD_TYPE(msg->elements[i].flags) == LDB_FLAG_MOD_DELETE) { ldb_msg_remove_element(msg, &msg->elements[i]); } else { ++i; |