summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/responder/nss/nsssrv_cmd.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index eb2a1644..25e914bb 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -534,7 +534,11 @@ static int nss_cmd_getpwnam_search(struct nss_dom_ctx *dctx)
/* if neg cached, return we didn't find it */
if (ret == EEXIST) {
DEBUG(2, ("User [%s] does not exist! (negative cache)\n", name));
- return ENOENT;
+ /* if a multidomain search, try with next */
+ if (cmdctx->check_next) {
+ dom = dom->next;
+ continue;
+ }
}
DEBUG(4, ("Requesting info for [%s@%s]\n", name, dom->name));
@@ -1604,7 +1608,11 @@ static int nss_cmd_getgrnam_search(struct nss_dom_ctx *dctx)
/* if neg cached, return we didn't find it */
if (ret == EEXIST) {
DEBUG(2, ("Group [%s] does not exist! (negative cache)\n", name));
- return ENOENT;
+ /* if a multidomain search, try with next */
+ if (cmdctx->check_next) {
+ dom = dom->next;
+ continue;
+ }
}
DEBUG(4, ("Requesting info for [%s@%s]\n", name, dom->name));
@@ -2449,7 +2457,11 @@ static int nss_cmd_initgroups_search(struct nss_dom_ctx *dctx)
/* if neg cached, return we didn't find it */
if (ret == EEXIST) {
DEBUG(2, ("User [%s] does not exist! (negative cache)\n", name));
- return ENOENT;
+ /* if a multidomain search, try with next */
+ if (cmdctx->check_next) {
+ dom = dom->next;
+ continue;
+ }
}
DEBUG(4, ("Requesting info for [%s@%s]\n", name, dom->name));