diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-10-13 10:03:57 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-10-13 10:03:57 +1100 |
commit | ae507f620ae34b69c5df86980ea6e374c9c1e548 (patch) | |
tree | c2669a72121c02ecc2d1e4aee16a3129960a5c66 /source4/dsdb/samdb/ldb_modules/objectclass.c | |
parent | dfbaf79a1b7455a0eef61813e07cb661cf17e995 (diff) | |
parent | 4a1b50afd567313cc25d5bbc14e01e170aa62a00 (diff) | |
download | samba-ae507f620ae34b69c5df86980ea6e374c9c1e548.tar.gz samba-ae507f620ae34b69c5df86980ea6e374c9c1e548.tar.bz2 samba-ae507f620ae34b69c5df86980ea6e374c9c1e548.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/objectclass.c')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/objectclass.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c b/source4/dsdb/samdb/ldb_modules/objectclass.c index b6f1a1aa23..b5e058df0b 100644 --- a/source4/dsdb/samdb/ldb_modules/objectclass.c +++ b/source4/dsdb/samdb/ldb_modules/objectclass.c @@ -706,7 +706,13 @@ static int objectclass_modify(struct ldb_module *module, struct ldb_request *req if (!schema) { return ldb_next_request(module, req); } - objectclass_element = ldb_msg_find_element(req->op.mod.message, "objectClass"); + + /* As with the "real" AD we don't accept empty messages */ + if (req->op.mod.message->num_elements == 0) { + ldb_set_errstring(ldb, "objectclass: modify message must have " + "elements/attributes!"); + return LDB_ERR_UNWILLING_TO_PERFORM; + } ac = oc_init_context(module, req); if (ac == NULL) { @@ -715,6 +721,7 @@ static int objectclass_modify(struct ldb_module *module, struct ldb_request *req /* If no part of this touches the objectClass, then we don't * need to make any changes. */ + objectclass_element = ldb_msg_find_element(req->op.mod.message, "objectClass"); /* If the only operation is the deletion of the objectClass * then go on with just fixing the attribute case */ |