summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/acl.c
diff options
context:
space:
mode:
authorBrendan Powers <brendan0powers@gmail.com>2009-12-14 20:32:28 -0500
committerAndrew Bartlett <abartlet@samba.org>2009-12-18 14:27:43 +1100
commit2ad086e7f6ab39767cd691b059ab5d78b03d55c0 (patch)
treedd92a1711fe76a9232f33a17e58d0178911ebc26 /source4/dsdb/samdb/ldb_modules/acl.c
parent027cba6a49fa1b7ed81d22d3cac7cc1d469d547a (diff)
downloadsamba-2ad086e7f6ab39767cd691b059ab5d78b03d55c0.tar.gz
samba-2ad086e7f6ab39767cd691b059ab5d78b03d55c0.tar.bz2
samba-2ad086e7f6ab39767cd691b059ab5d78b03d55c0.zip
s4-dsdb: Add a check to prevent acl_modify from debuging a NULL message
Check to see if there were any messages passed to acl_modify before debugging the first one. I think I caused this by some malformed LDIF. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/acl.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/acl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
index 6cb50b2098..b70b8956bb 100644
--- a/source4/dsdb/samdb/ldb_modules/acl.c
+++ b/source4/dsdb/samdb/ldb_modules/acl.c
@@ -760,7 +760,11 @@ static int acl_modify(struct ldb_module *module, struct ldb_request *req)
NULL
};
- DEBUG(10, ("ldb:acl_modify: %s\n", req->op.mod.message->elements[0].name));
+ /* Don't print this debug statement if elements[0].name is going to be NULL */
+ if(req->op.mod.message->num_elements > 0)
+ {
+ DEBUG(10, ("ldb:acl_modify: %s\n", req->op.mod.message->elements[0].name));
+ }
if (what_is_user(module) == SECURITY_SYSTEM) {
return ldb_next_request(module, req);
}