diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2013-04-29 14:37:27 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-05-30 17:21:35 +0200 |
commit | f07523526597f6232dfcafbe23e0857ec61f69ab (patch) | |
tree | 586581e3fcee4da24fd487c3f4070a278bdf6bf2 /src/tests | |
parent | d00672f4efc25a3cfd7252254854dfc60deeec6b (diff) | |
download | sssd-f07523526597f6232dfcafbe23e0857ec61f69ab.tar.gz sssd-f07523526597f6232dfcafbe23e0857ec61f69ab.tar.xz sssd-f07523526597f6232dfcafbe23e0857ec61f69ab.zip |
Only try to relink ghost users if we're not enumerating1.9.2-90
https://fedorahosted.org/sssd/ticket/1893
When SSSD is not enumerating (which is the default), we are trying to
link any "ghost" entries with a newly created user entry. However, when
enumeration is on, this means a spurious search on adding any user.
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/sysdb-tests.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c index db45b7a61..53152e895 100644 --- a/src/tests/sysdb-tests.c +++ b/src/tests/sysdb-tests.c @@ -60,7 +60,7 @@ struct sysdb_test_ctx { struct sss_domain_info *domain; }; -static int setup_sysdb_tests(struct sysdb_test_ctx **ctx) +static int _setup_sysdb_tests(struct sysdb_test_ctx **ctx, bool enumerate) { struct sysdb_test_ctx *test_ctx; char *conf_db; @@ -127,7 +127,7 @@ static int setup_sysdb_tests(struct sysdb_test_ctx **ctx) return ret; } - val[0] = "TRUE"; + val[0] = enumerate ? "TRUE" : "FALSE"; ret = confdb_add_param(test_ctx->confdb, true, "config/domain/LOCAL", "enumerate", val); if (ret != EOK) { @@ -158,6 +158,8 @@ static int setup_sysdb_tests(struct sysdb_test_ctx **ctx) return EOK; } +#define setup_sysdb_tests(ctx) _setup_sysdb_tests((ctx), false) + struct test_data { struct tevent_context *ev; struct sysdb_test_ctx *ctx; @@ -2976,8 +2978,10 @@ START_TEST (test_sysdb_memberof_check_convert) struct ldb_message_element *members; int exp_mem, exp_gh; - /* Setup */ - ret = setup_sysdb_tests(&test_ctx); + /* Eplicitly disable enumeration during setup as converting the ghost + * users into real ones work only when enumeration is disabled + */ + ret = _setup_sysdb_tests(&test_ctx, false); if (ret != EOK) { fail("Could not set up the test"); return; |