From 97d3ef21d9f293f0b4bc0cc38b37f4e3d54d3572 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 3 Dec 2013 20:45:44 +0100 Subject: AD: Add a utility function to create list of connections ad_id.c and ad_access.c used the same block of code. With the upcoming option to disable GC lookups, we should unify the code in a function to avoid breaking one of the code paths. The same applies for the LDAP connection to the trusted AD DC. Includes a unit test. --- Makefile.am | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 4452566ec..f19bb3e08 100644 --- a/Makefile.am +++ b/Makefile.am @@ -152,6 +152,7 @@ if HAVE_CMOCKA test_sss_idmap \ test_utils \ ad_access_filter_tests \ + ad_common_tests \ test_search_bases endif @@ -1395,6 +1396,7 @@ ad_access_filter_tests_SOURCES = \ src/util/sss_krb5.c \ src/util/find_uid.c \ src/util/user_info_msg.c \ + src/providers/ad/ad_common.c \ src/tests/cmocka/test_ad_access_filter.c ad_access_filter_tests_CFLAGS = \ $(AM_CFLAGS) \ @@ -1413,6 +1415,32 @@ ad_access_filter_tests_LDADD = \ libsss_krb5_common.la \ libsss_test_common.la +ad_common_tests_SOURCES = \ + $(sssd_be_SOURCES) \ + src/util/sss_ldap.c \ + src/util/sss_krb5.c \ + src/util/find_uid.c \ + src/util/user_info_msg.c \ + src/tests/cmocka/test_ad_common.c +ad_common_tests_CFLAGS = \ + $(AM_CFLAGS) \ + $(SYSTEMD_LOGIN_CFLAGS) \ + -DUNIT_TESTING +ad_common_tests_LDFLAGS = \ + -Wl,-wrap,sdap_set_sasl_options +ad_common_tests_LDADD = \ + $(PAM_LIBS) \ + $(CMOCKA_LIBS) \ + $(SSSD_LIBS) \ + $(CARES_LIBS) \ + $(KRB5_LIBS) \ + $(SSSD_INTERNAL_LTLIBS) \ + $(SYSTEMD_LOGIN_LIBS) \ + libsss_ldap_common.la \ + libsss_idmap.la \ + libsss_krb5_common.la \ + libsss_test_common.la + endif noinst_PROGRAMS = pam_test_client -- cgit