summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-12-07 18:39:29 +0100
committerMichael Adam <obnox@samba.org>2012-12-10 13:53:46 +0100
commite2181617a00d7982e4e6ced1c51aa2ee8a40df26 (patch)
tree6ae6439f88317ef1b75c0b7b32aa2c27235fc8cc
parent6bcafceb750d5c4d24e2ddbef35b411bebccd66f (diff)
downloadsamba-e2181617a00d7982e4e6ced1c51aa2ee8a40df26.tar.gz
samba-e2181617a00d7982e4e6ced1c51aa2ee8a40df26.tar.bz2
samba-e2181617a00d7982e4e6ced1c51aa2ee8a40df26.zip
s4:dsdb/acl_read: check the ldb_attr_list_copy_add() result
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
-rw-r--r--source4/dsdb/samdb/ldb_modules/acl_read.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/acl_read.c b/source4/dsdb/samdb/ldb_modules/acl_read.c
index 2b20f249d9..c42db5f13b 100644
--- a/source4/dsdb/samdb/ldb_modules/acl_read.c
+++ b/source4/dsdb/samdb/ldb_modules/acl_read.c
@@ -375,12 +375,18 @@ static int aclread_search(struct ldb_module *module, struct ldb_request *req)
if (!ldb_attr_in_list(req->op.search.attrs, "instanceType")) {
ac->instance_type = true;
attrs = ldb_attr_list_copy_add(ac, req->op.search.attrs, "instanceType");
+ if (attrs == NULL) {
+ return ldb_oom(ldb);
+ }
} else {
attrs = req->op.search.attrs;
}
if (!ldb_attr_in_list(req->op.search.attrs, "objectSid")) {
ac->object_sid = true;
attrs = ldb_attr_list_copy_add(ac, attrs, "objectSid");
+ if (attrs == NULL) {
+ return ldb_oom(ldb);
+ }
}
}
@@ -389,8 +395,14 @@ static int aclread_search(struct ldb_module *module, struct ldb_request *req)
* if attribute list is empty */
if (!attrs) {
attrs = ldb_attr_list_copy_add(ac, req->op.search.attrs, "*");
+ if (attrs == NULL) {
+ return ldb_oom(ldb);
+ }
}
attrs = ldb_attr_list_copy_add(ac, attrs, "nTSecurityDescriptor");
+ if (attrs == NULL) {
+ return ldb_oom(ldb);
+ }
}
ac->attrs = req->op.search.attrs;
ret = ldb_build_search_req_ex(&down_req,