From 01570ffef3f476905034d4a528bcc6ad44a2c157 Mon Sep 17 00:00:00 2001 From: Brendan Powers Date: Mon, 14 Dec 2009 20:32:28 -0500 Subject: [PATCH] s4-dsdb: Add a check to prevent acl_modify from debuging a NULL message --- source4/dsdb/samdb/ldb_modules/acl.c | 6 +++++- 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 45aa294..fc29ba9 100644 --- a/source4/dsdb/samdb/ldb_modules/acl.c +++ b/source4/dsdb/samdb/ldb_modules/acl.c @@ -700,7 +700,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); } -- 1.5.4.3