summaryrefslogtreecommitdiffstats
path: root/src/responder/secrets
diff options
context:
space:
mode:
authorFabiano FidĂȘncio <fidencio@redhat.com>2016-08-30 10:42:58 +0200
committerJakub Hrozek <jhrozek@redhat.com>2016-09-13 16:36:52 +0200
commita8361f37af31a8a9767056bd27c418c947293f56 (patch)
treee53a83356391539a0259c3fcc43fab9c6598fbbe /src/responder/secrets
parentaef0171e0bdc9a683958d69c7ee984fb10cd5de7 (diff)
downloadsssd-a8361f37af31a8a9767056bd27c418c947293f56.tar.gz
sssd-a8361f37af31a8a9767056bd27c418c947293f56.tar.xz
sssd-a8361f37af31a8a9767056bd27c418c947293f56.zip
SECRETS: Search by the right type when checking containers
We've been searching for the wrong type ("simple") in local_db_check_containers(), which always gives us a NULL result. Let's introduce the new LOCAL_CONTAINER_FILTER and do the search for the right type ("container") from now on. Resolves: https://fedorahosted.org/sssd/ticket/3137 Signed-off-by: Fabiano FidĂȘncio <fidencio@redhat.com> Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/responder/secrets')
-rw-r--r--src/responder/secrets/local.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/responder/secrets/local.c b/src/responder/secrets/local.c
index ac3049b62..5b5745d67 100644
--- a/src/responder/secrets/local.c
+++ b/src/responder/secrets/local.c
@@ -168,6 +168,7 @@ char *local_dn_to_path(TALLOC_CTX *mem_ctx,
}
#define LOCAL_SIMPLE_FILTER "(type=simple)"
+#define LOCAL_CONTAINER_FILTER "(type=container)"
int local_db_get_simple(TALLOC_CTX *mem_ctx,
struct local_context *lctx,
@@ -306,7 +307,7 @@ int local_db_check_containers(TALLOC_CTX *mem_ctx,
/* and check the parent container exists */
ret = ldb_search(lctx->ldb, mem_ctx, &res, dn, LDB_SCOPE_BASE,
- attrs, LOCAL_SIMPLE_FILTER);
+ attrs, LOCAL_CONTAINER_FILTER);
if (ret != LDB_SUCCESS) return ENOENT;
if (res->count != 1) return ENOENT;
talloc_free(res);