summaryrefslogtreecommitdiffstats
path: root/src/providers
diff options
context:
space:
mode:
authorPavel Reichl <preichl@redhat.com>2014-11-04 08:52:54 +0000
committerJakub Hrozek <jhrozek@redhat.com>2014-12-02 22:41:07 +0100
commitc9eaf8c1e02c155b7ca7ffb2b1edade8a23ce1ff (patch)
tree357b3c9afb511d30ad1d4d34bfee040f3da8c076 /src/providers
parentb6db8fe1d18bffd600899c8e02f4cea83d70e447 (diff)
downloadsssd-c9eaf8c1e02c155b7ca7ffb2b1edade8a23ce1ff.tar.gz
sssd-c9eaf8c1e02c155b7ca7ffb2b1edade8a23ce1ff.tar.xz
sssd-c9eaf8c1e02c155b7ca7ffb2b1edade8a23ce1ff.zip
SYSDB: sysdb_get_bool() return ENOENT & unit tests
sysdb_get_bool() return ENOENT if no result is found. Unit test for sysdb_get_bool() & sysdb_set_bool() was added. This patch also fixes ldap_setup_enumeration() to handle ENOENT returned by sysdb_has_enumerated(). Resolves: https://fedorahosted.org/sssd/ticket/1991 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ldap/ldap_id_enum.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/providers/ldap/ldap_id_enum.c b/src/providers/ldap/ldap_id_enum.c
index 9ffa3e5d9..13d2a6254 100644
--- a/src/providers/ldap/ldap_id_enum.c
+++ b/src/providers/ldap/ldap_id_enum.c
@@ -41,7 +41,11 @@ errno_t ldap_setup_enumeration(struct be_ctx *be_ctx,
struct ldap_enum_ctx *ectx;
ret = sysdb_has_enumerated(sdom->dom, &has_enumerated);
- if (ret != EOK) {
+ if (ret == ENOENT) {
+ /* default value */
+ has_enumerated = false;
+ ret = EOK;
+ } else if (ret != EOK) {
return ret;
}