From 6e2c5a81b6af083d7909a18881971b5d907d65b1 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Tue, 25 Jun 2013 09:44:17 +0200 Subject: Do not call sss_cmd_done in function check_cache. Function sysdb_getpwnam return more results than 1 and therefore sss_cmd_done was called. Inside of function sss_cmd_done memory was freed, but this freed memory was used in caller functions, therefore sssd crashed. https://fedorahosted.org/sssd/ticket/1980 --- src/responder/nss/nsssrv_cmd.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src') diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c index 3e5e8a78..62a564a4 100644 --- a/src/responder/nss/nsssrv_cmd.c +++ b/src/responder/nss/nsssrv_cmd.c @@ -494,7 +494,6 @@ static int nss_cmd_getpw_send_reply(struct nss_dom_ctx *dctx, bool filter) static void nsssrv_dp_send_acct_req_done(struct tevent_req *req); /* FIXME: do not check res->count, but get in a msgs and check in parent */ -/* FIXME: do not sss_cmd_done, but return error and let parent do it */ errno_t check_cache(struct nss_dom_ctx *dctx, struct nss_ctx *nctx, struct ldb_result *res, @@ -518,11 +517,6 @@ errno_t check_cache(struct nss_dom_ctx *dctx, (res->count > 1)) { DEBUG(1, ("getpwXXX call returned more than one result!" " DB Corrupted?\n")); - ret = nss_cmd_send_error(cmdctx, ENOENT); - if (ret != EOK) { - NSS_CMD_FATAL_ERROR_CODE(cctx, ENOENT); - } - sss_cmd_done(cctx, cmdctx); return ENOENT; } -- cgit