diff options
author | Simo Sorce <ssorce@redhat.com> | 2009-04-16 09:54:07 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-04-16 11:06:08 -0400 |
commit | 6ff8473bf537af9bb34e46842374e4eef2288968 (patch) | |
tree | c06e42b705e62b08729149295b706a343d2b9e0c /server/responder/nss | |
parent | 7ea9dc2bdf76ed330a8132d2ccabd5fdba227fdd (diff) | |
download | sssd-6ff8473bf537af9bb34e46842374e4eef2288968.tar.gz sssd-6ff8473bf537af9bb34e46842374e4eef2288968.tar.bz2 sssd-6ff8473bf537af9bb34e46842374e4eef2288968.zip |
Fix by_id enumeration with multiple domains
We need to stop parsing domains as soon as a caaandidate is found and let the
callback search additional domains if the id is not found.
Should fix ticket #21
Diffstat (limited to 'server/responder/nss')
-rw-r--r-- | server/responder/nss/nsssrv_cmd.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/responder/nss/nsssrv_cmd.c b/server/responder/nss/nsssrv_cmd.c index ba444ccf..0f0c0b94 100644 --- a/server/responder/nss/nsssrv_cmd.c +++ b/server/responder/nss/nsssrv_cmd.c @@ -858,6 +858,9 @@ static int nss_cmd_getpwuid(struct cli_ctx *cctx) } cmdctx->id = *((uint32_t *)body); + /* this is a multidomain search */ + cmdctx->check_next = true; + for (dom = cctx->rctx->domains; dom; dom = dom->next) { /* verify this user has not yet been negatively cached, * or has been permanently filtered */ @@ -890,6 +893,8 @@ static int nss_cmd_getpwuid(struct cli_ctx *cctx) if (ret != EOK) { DEBUG(1, ("Failed to make request to our cache!\n")); } + + break; } done: @@ -2205,6 +2210,9 @@ static int nss_cmd_getgrgid(struct cli_ctx *cctx) } cmdctx->id = *((uint32_t *)body); + /* this is a multidomain search */ + cmdctx->check_next = true; + for (dom = cctx->rctx->domains; dom; dom = dom->next) { /* verify this user has not yet been negatively cached, * or has been permanently filtered */ @@ -2237,6 +2245,8 @@ static int nss_cmd_getgrgid(struct cli_ctx *cctx) if (ret != EOK) { DEBUG(1, ("Failed to make request to our cache!\n")); } + + break; } done: |