diff options
author | Simo Sorce <ssorce@redhat.com> | 2009-03-18 11:55:41 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-03-18 19:45:00 -0400 |
commit | e2e17b7a75e65b2db2eb484f24ecde4f7aa5566b (patch) | |
tree | 50016acb71d0a54ca5a95f9699ffc0e29f2f9629 /server/responder/nss/nsssrv_cmd.c | |
parent | 3e9e1ee4678b38044cbce7ace7e34d4b6aa19c53 (diff) | |
download | sssd-e2e17b7a75e65b2db2eb484f24ecde4f7aa5566b.tar.gz sssd-e2e17b7a75e65b2db2eb484f24ecde4f7aa5566b.tar.bz2 sssd-e2e17b7a75e65b2db2eb484f24ecde4f7aa5566b.zip |
Fix getgrent and getpwent calls
When I converted from using just the domain name to passing down the info
structure I goofed how to test if we were willing to attach the local domain to
the user/group names or not.
Diffstat (limited to 'server/responder/nss/nsssrv_cmd.c')
-rw-r--r-- | server/responder/nss/nsssrv_cmd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/responder/nss/nsssrv_cmd.c b/server/responder/nss/nsssrv_cmd.c index ef9dd31d..ebd4adae 100644 --- a/server/responder/nss/nsssrv_cmd.c +++ b/server/responder/nss/nsssrv_cmd.c @@ -859,7 +859,9 @@ static void nss_cmd_setpwent_callback(void *ptr, int status, pctx->doms = talloc_realloc(pctx, pctx->doms, struct dom_ctx, pctx->num +1); if (!pctx->doms) NSS_CMD_FATAL_ERROR(cctx); - pctx->doms[pctx->num].domain = dctx->domain->name; + if (dctx->add_domain) { + pctx->doms[pctx->num].domain = dctx->domain->name; + } pctx->doms[pctx->num].res = talloc_steal(pctx->doms, res); pctx->doms[pctx->num].cur = 0; @@ -1897,7 +1899,9 @@ static void nss_cmd_setgrent_callback(void *ptr, int status, gctx->doms = talloc_realloc(gctx, gctx->doms, struct dom_ctx, gctx->num +1); if (!gctx->doms) NSS_CMD_FATAL_ERROR(cctx); - gctx->doms[gctx->num].domain = dctx->domain->name; + if (dctx->add_domain) { + gctx->doms[gctx->num].domain = dctx->domain->name; + } gctx->doms[gctx->num].res = talloc_steal(gctx->doms, res); gctx->doms[gctx->num].cur = 0; |