summaryrefslogtreecommitdiffstats
path: root/src/responder/nss/nsssrv_cmd.c
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2011-04-15 09:20:48 -0400
committerStephen Gallagher <sgallagh@redhat.com>2011-04-15 11:36:59 -0400
commitd999fd357fd7df16a85fa21fd6e05e54c60ec1cd (patch)
tree380df557fbe8913b6f629bd4fabadd55848bfdf2 /src/responder/nss/nsssrv_cmd.c
parent0752902ba3c9e048957aede22254659c76000cdb (diff)
downloadsssd-d999fd357fd7df16a85fa21fd6e05e54c60ec1cd.tar.gz
sssd-d999fd357fd7df16a85fa21fd6e05e54c60ec1cd.tar.xz
sssd-d999fd357fd7df16a85fa21fd6e05e54c60ec1cd.zip
Fix a regression with the negative cache in multi-domain configurations
Diffstat (limited to 'src/responder/nss/nsssrv_cmd.c')
-rw-r--r--src/responder/nss/nsssrv_cmd.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index 2153d649c..b897c7cdf 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -532,12 +532,17 @@ 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));
+ DEBUG(2, ("User [%s] does not exist in [%s]! (negative cache)\n",
+ name, dom->name));
/* if a multidomain search, try with next */
if (cmdctx->check_next) {
dom = dom->next;
continue;
}
+ /* There are no further domains or this was a
+ * fully-qualified user request.
+ */
+ return ENOENT;
}
DEBUG(4, ("Requesting info for [%s@%s]\n", name, dom->name));
@@ -1794,12 +1799,17 @@ 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));
+ DEBUG(2, ("Group [%s] does not exist in [%s]! (negative cache)\n",
+ name, dom->name));
/* if a multidomain search, try with next */
if (cmdctx->check_next) {
dom = dom->next;
continue;
}
+ /* There are no further domains or this was a
+ * fully-qualified user request.
+ */
+ return ENOENT;
}
DEBUG(4, ("Requesting info for [%s@%s]\n", name, dom->name));
@@ -2827,12 +2837,17 @@ 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));
+ DEBUG(2, ("User [%s] does not exist in [%s]! (negative cache)\n",
+ dom->name, name));
/* if a multidomain search, try with next */
if (cmdctx->check_next) {
dom = dom->next;
continue;
}
+ /* There are no further domains or this was a
+ * fully-qualified user request.
+ */
+ return ENOENT;
}
DEBUG(4, ("Requesting info for [%s@%s]\n", name, dom->name));