summaryrefslogtreecommitdiff
path: root/src/responder/nss
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2012-05-23 08:35:26 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-05-24 08:12:13 -0400
commitde00277c5a865501aa9d835c8dc94c7d22dfd88d (patch)
treebca96879b538b88e6120c5201baee36aeb559b54 /src/responder/nss
parentd4080fe3e5e25562d2dee8b4ae72064d9d72c0bc (diff)
downloadsssd-de00277c5a865501aa9d835c8dc94c7d22dfd88d.tar.gz
sssd-de00277c5a865501aa9d835c8dc94c7d22dfd88d.tar.bz2
sssd-de00277c5a865501aa9d835c8dc94c7d22dfd88d.zip
NSS: Fix segfault when mmap cache cannot be initialized
Diffstat (limited to 'src/responder/nss')
-rw-r--r--src/responder/nss/nsssrv_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index aa3ef3cb..1b444e68 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -365,7 +365,7 @@ static int fill_pwent(struct sss_packet *packet,
num++;
- if (pw_mmap_cache) {
+ if (pw_mmap_cache && nctx->pwd_mc_ctx) {
ret = sss_mmap_cache_pw_store(nctx->pwd_mc_ctx,
&fullname, &pwfield,
uid, gid,
@@ -1918,7 +1918,7 @@ static int fill_grent(struct sss_packet *packet,
num++;
- if (gr_mmap_cache) {
+ if (gr_mmap_cache && nctx->grp_mc_ctx) {
/* body was reallocated, so fullname might be pointing to
* where body used to be, not where it is */
to_sized_string(&fullname, (const char *)&body[rzero+STRS_ROFFSET]);