summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/providers/ipa/ipa_common.c16
-rw-r--r--src/providers/ipa/ipa_common.h15
-rw-r--r--src/tests/ipa_ldap_opt-tests.c12
3 files changed, 1 insertions, 42 deletions
diff --git a/src/providers/ipa/ipa_common.c b/src/providers/ipa/ipa_common.c
index 3ba666e2..5d2f7987 100644
--- a/src/providers/ipa/ipa_common.c
+++ b/src/providers/ipa/ipa_common.c
@@ -176,14 +176,6 @@ int ipa_get_id_options(struct ipa_options *ipa_opts,
int ret;
int i;
- /* self check test, this should never fail, unless someone forgot
- * to properly update the code after new ldap options have been added */
- if (SDAP_OPTS_BASIC != IPA_OPTS_BASIC_TEST) {
- DEBUG(0, ("Option numbers do not match (%d != %d)\n",
- SDAP_OPTS_BASIC, IPA_OPTS_BASIC_TEST));
- abort();
- }
-
tmpctx = talloc_new(ipa_opts);
if (!tmpctx) {
return ENOMEM;
@@ -586,14 +578,6 @@ int ipa_get_auth_options(struct ipa_options *ipa_opts,
char *copy = NULL;
int ret;
- /* self check test, this should never fail, unless someone forgot
- * to properly update the code after new ldap options have been added */
- if (KRB5_OPTS != IPA_KRB5_OPTS_TEST) {
- DEBUG(0, ("Option numbers do not match (%d != %d)\n",
- KRB5_OPTS, IPA_KRB5_OPTS_TEST));
- abort();
- }
-
ipa_opts->auth = talloc_zero(ipa_opts, struct dp_option);
if (ipa_opts->auth == NULL) {
ret = ENOMEM;
diff --git a/src/providers/ipa/ipa_common.h b/src/providers/ipa/ipa_common.h
index 26a6f9d9..d29cf92d 100644
--- a/src/providers/ipa/ipa_common.h
+++ b/src/providers/ipa/ipa_common.h
@@ -32,21 +32,6 @@ struct ipa_service {
struct krb5_service *krb5_service;
};
-/* the following defines are used to keep track of the options in the ldap
- * module, so that if they change and ipa is not updated correspondingly
- * this will trigger a runtime abort error */
-#define IPA_OPTS_BASIC_TEST 61
-
-#define IPA_OPTS_SVC_TEST 5
-
-#define IPA_OPTS_AUTOMNTMAP_TEST 2
-#define IPA_OPTS_AUTOMNTENTRY_TEST 3
-
-/* the following define is used to keep track of the options in the krb5
- * module, so that if they change and ipa is not updated correspondingly
- * this will trigger a runtime abort error */
-#define IPA_KRB5_OPTS_TEST 15
-
enum ipa_basic_opt {
IPA_DOMAIN = 0,
IPA_SERVER,
diff --git a/src/tests/ipa_ldap_opt-tests.c b/src/tests/ipa_ldap_opt-tests.c
index 3f94d681..4c881379 100644
--- a/src/tests/ipa_ldap_opt-tests.c
+++ b/src/tests/ipa_ldap_opt-tests.c
@@ -30,6 +30,7 @@
#include "providers/ipa/ipa_opts.h"
#include "providers/ldap/sdap.h"
#include "providers/ldap/ldap_opts.h"
+#include "providers/krb5/krb5_opts.h"
#include "providers/krb5/krb5_common.h"
#include "tests/common.h"
@@ -76,16 +77,6 @@ START_TEST(test_domain_to_basedn)
}
END_TEST
-START_TEST(test_check_num_opts)
-{
- fail_if(IPA_OPTS_BASIC_TEST != SDAP_OPTS_BASIC);
- fail_if(IPA_OPTS_SVC_TEST != SDAP_OPTS_SERVICES);
- fail_if(IPA_OPTS_AUTOMNTMAP_TEST != SDAP_OPTS_AUTOFS_MAP);
- fail_if(IPA_OPTS_AUTOMNTENTRY_TEST != SDAP_OPTS_AUTOFS_ENTRY);
- fail_if(IPA_KRB5_OPTS_TEST != KRB5_OPTS);
-}
-END_TEST
-
START_TEST(test_compare_opts)
{
errno_t ret;
@@ -143,7 +134,6 @@ Suite *ipa_ldap_opt_suite (void)
TCase *tc_ipa_ldap_opt = tcase_create ("ipa_ldap_opt");
- tcase_add_test (tc_ipa_ldap_opt, test_check_num_opts);
tcase_add_test (tc_ipa_ldap_opt, test_compare_opts);
tcase_add_test (tc_ipa_ldap_opt, test_compare_sdap_attrs);
suite_add_tcase (s, tc_ipa_ldap_opt);