summaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
Diffstat (limited to 'src/db')
-rw-r--r--src/db/sysdb_search.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/db/sysdb_search.c b/src/db/sysdb_search.c
index 6029b99d..a24ea5b1 100644
--- a/src/db/sysdb_search.c
+++ b/src/db/sysdb_search.c
@@ -383,10 +383,20 @@ int sysdb_initgroups(TALLOC_CTX *mem_ctx,
ret = sysdb_getpwnam(tmpctx, ctx, domain, name, &res);
if (ret != EOK) {
+ DEBUG(1, ("sysdb_getpwnam failed: [%d][%s]\n",
+ ret, strerror(ret)));
goto done;
}
- if (res->count != 1) {
+
+ if (res->count == 0) {
+ /* User is not cached yet */
+ *_res = talloc_steal(mem_ctx, res);
+ ret = EOK;
+ goto done;
+
+ } else if (res->count != 1) {
ret = EIO;
+ DEBUG(1, ("sysdb_getpwnam returned count: [%d]\n", res->count));
goto done;
}