diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2014-09-23 16:27:23 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-10-22 15:43:42 +0200 |
commit | 5eda23c28c582b43b2a0a165b1750f3875c0fa84 (patch) | |
tree | 2cf532925461c2292ad4252406cb4a0ad578bbb7 /src/tests/cwrap/Makefile.am | |
parent | e373fffbb8e06d0d7682d095c734e8df8a499ba0 (diff) | |
download | sssd-5eda23c28c582b43b2a0a165b1750f3875c0fa84.tar.gz sssd-5eda23c28c582b43b2a0a165b1750f3875c0fa84.tar.xz sssd-5eda23c28c582b43b2a0a165b1750f3875c0fa84.zip |
UTIL: Add a function to convert id_t from a number or a name
We need a custom function that would convert a numeric or string input
into uid_t. The function will be used to drop privileges in servers and
also in the PAC and IFP responders.
Includes a unit test to test all code that changed as well as a fix for
a misnamed attribute in the csv_to_uid_list function synopsis.
Reviewed-by: Pavel Reichl <preichl@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'src/tests/cwrap/Makefile.am')
-rw-r--r-- | src/tests/cwrap/Makefile.am | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/tests/cwrap/Makefile.am b/src/tests/cwrap/Makefile.am index d1f0e9e1b..02be67387 100644 --- a/src/tests/cwrap/Makefile.am +++ b/src/tests/cwrap/Makefile.am @@ -45,6 +45,8 @@ if HAVE_UID_WRAPPER check_PROGRAMS += \ become_user-tests \ server-tests \ + usertools-tests \ + responder_common-tests \ $(NULL) endif # HAVE_UID_WRAPPER endif # HAVE_NSS_WRAPPER @@ -106,4 +108,56 @@ server_tests_LDADD = \ $(abs_top_builddir)/libsss_test_common.la \ $(NULL) +usertools_tests_SOURCES = \ + test_usertools.c \ + ../../../src/util/domain_info_utils.c \ + ../../../src/util/safe-format-string.c \ + ../../../src/util/usertools.c \ + ../../../src/util/strtonum.c \ + ../../../src/util/backup_file.c \ + ../../../src/util/atomic_io.c \ + ../../../src/util/util.c \ + ../../../src/util/util_errors.c \ + ../../../src/util/sss_tc_utf8.c \ + ../../../src/util/sss_utf8.c \ + ../../../src/confdb/confdb.c \ + ../../../src/db/sysdb.c \ + ../../../src/db/sysdb_upgrade.c \ + ../../../src/db/sysdb_autofs.c \ + ../../../src/db/sysdb_search.c \ + ../../../src/db/sysdb_services.c \ + ../../../src/db/sysdb_ops.c \ + ../../../src/db/sysdb_views.c \ + $(NULL) +usertools_tests_CFLAGS = \ + $(AM_CFLAGS) \ + $(NULL) +usertools_tests_LDADD = \ + $(CMOCKA_LIBS) \ + $(UNICODE_LIBS) \ + $(SSSD_LIBS) \ + $(abs_top_builddir)/libsss_debug.la \ + $(abs_top_builddir)/libsss_crypt.la \ + $(abs_top_builddir)/libsss_test_common.la \ + $(NULL) + +responder_common_tests_SOURCES =\ + test_responder_common.c \ + ../../../src/responder/common/responder_common.c \ + ../../../src/responder/common/responder_packet.c \ + ../../../src/responder/common/responder_cmd.c \ + $(NULL) +responder_common_tests_CFLAGS = \ + $(AM_CFLAGS) \ + $(NULL) +responder_common_tests_LDADD = \ + $(CMOCKA_LIBS) \ + $(UNICODE_LIBS) \ + $(SSSD_LIBS) \ + $(abs_top_builddir)/libsss_debug.la \ + $(abs_top_builddir)/libsss_crypt.la \ + $(abs_top_builddir)/libsss_util.la \ + $(abs_top_builddir)/libsss_test_common.la \ + $(NULL) + tests: $(check_PROGRAMS) |