summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-06-25 09:44:17 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-06-27 20:51:28 +0200
commit6e2c5a81b6af083d7909a18881971b5d907d65b1 (patch)
tree9e1838f8dba41129bc3fced875262408da5eaa2d /src
parentf2022f7ba55973ae8b8baf2d4307322a180357b9 (diff)
downloadsssd-6e2c5a81b6af083d7909a18881971b5d907d65b1.tar.gz
sssd-6e2c5a81b6af083d7909a18881971b5d907d65b1.tar.bz2
sssd-6e2c5a81b6af083d7909a18881971b5d907d65b1.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/responder/nss/nsssrv_cmd.c6
1 files changed, 0 insertions, 6 deletions
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;
}