summaryrefslogtreecommitdiffstats
path: root/src/tests/cwrap
Commit message (Collapse)AuthorAgeFilesLines
* UTIL: Add a function to convert id_t from a number or a nameJakub Hrozek2014-10-224-1/+306
| | | | | | | | | | | | 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>
* test_server: Fix waiting for background processLukas Slebodnik2014-10-221-3/+6
| | | | | | | | A waiting loop for background process was very fast (just 5 milliseconds) It caused problem when test was executed with valgrind. The maximum time was increased to 10 seconds. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* BUILD: Fix automake warningLukas Slebodnik2014-10-221-4/+4
| | | | | | | | | | | src/tests/cwrap/Makefile.am:45: warning: check_PROGRAMS was already defined in condition TRUE, which includes condition HAVE_CMOCKA and HAVE_NSS_WRAPPER and HAVE_UID_WRAPPER ... src/tests/cwrap/Makefile.am:41: ... 'check_PROGRAMS' previously defined here This patch also replace '\t' with spaces Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* TESTS: Unit tests for server_setupJakub Hrozek2014-10-202-1/+266
| | | | | | | We changed server_setup, so we must make sure the function continues to work as expected. Reviewed-by: Pavel Reichl <preichl@redhat.com>
* TESTS: Add -std=gnu99 to cwrap tests CFLAGSPavel Reichl2014-10-201-0/+1
| | | | | | | | | | | ../../../../src/tests/cwrap/../../../src/util/domain_info_utils.c: In function ‘subdomain_enumerates’: ../../../../src/tests/cwrap/../../../src/util/domain_info_utils.c:77:9: error: ‘for’ loop initial declarations are only allowed in C99 mode for (int i=0; parent->sd_enumerate[i]; i++) { ^ ../../../../src/tests/cwrap/../../../src/util/domain_info_utils.c:77:9: note: use option -std=c99 or -std=gnu99 to compile your code make[3]: *** [../../../src/util/server_tests-domain_info_utils.o] Error 1 Reviewed-by: Pavel Reichl <preichl@redhat.com>
* TESTS: Add a test to change user IDsJakub Hrozek2014-10-105-0/+222
Adds a unit test using the nss_wrapper and uid_wrapper libraries that exercises the ability to become another user. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>