From b9ee942e471306596d3f34c69d30d29dbe30d855 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sat, 24 Oct 2009 12:26:39 -0400 Subject: Read the right buffer, avoids potential segfaults Also fix some debug message levels --- server/db/sysdb_ops.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'server') diff --git a/server/db/sysdb_ops.c b/server/db/sysdb_ops.c index 3d3f8e7e..e045ad7e 100644 --- a/server/db/sysdb_ops.c +++ b/server/db/sysdb_ops.c @@ -2865,7 +2865,7 @@ static void sysdb_store_group_check(struct tevent_req *subreq) state->member_users[i], state->domain->name); if (!member) { - DEBUG(6, ("Error: Out of memory\n")); + DEBUG(4, ("Error: Out of memory\n")); tevent_req_error(req, ENOMEM); return; } @@ -2875,7 +2875,7 @@ static void sysdb_store_group_check(struct tevent_req *subreq) ret = sysdb_attrs_steal_string(state->attrs, SYSDB_MEMBER, member); if (ret) { - DEBUG(6, ("Error: %d (%s)\n", ret, strerror(ret))); + DEBUG(4, ("Error: %d (%s)\n", ret, strerror(ret))); tevent_req_error(req, ret); return; } @@ -2885,10 +2885,10 @@ static void sysdb_store_group_check(struct tevent_req *subreq) char *member; member = talloc_asprintf(state, SYSDB_TMPL_GROUP, - state->member_users[i], + state->member_groups[i], state->domain->name); if (!member) { - DEBUG(6, ("Error: Out of memory\n")); + DEBUG(4, ("Error: Out of memory\n")); tevent_req_error(req, ENOMEM); return; } @@ -2898,7 +2898,7 @@ static void sysdb_store_group_check(struct tevent_req *subreq) ret = sysdb_attrs_steal_string(state->attrs, SYSDB_MEMBER, member); if (ret) { - DEBUG(6, ("Error: %d (%s)\n", ret, strerror(ret))); + DEBUG(4, ("Error: %d (%s)\n", ret, strerror(ret))); tevent_req_error(req, ret); return; } -- cgit