summaryrefslogtreecommitdiff
path: root/src/tests
AgeCommit message (Collapse)AuthorFilesLines
2013-10-17dlopen-tests: Check result of asprintfBenjamin Franzke1-1/+2
According to asprintf(3) the content off errmsg is undefined on error, lets set it to NULL.
2013-10-15Add CIFS idmap pluginBenjamin Franzke1-0/+3
https://fedorahosted.org/sssd/ticket/1534
2013-10-07krb5: Fix unit testsJakub Hrozek2-85/+46
2013-09-27IPA: store forest name for forest member domainsSumit Bose1-8/+8
In order to fix https://fedorahosted.org/sssd/ticket/2093 the name of the forest must be known for a member domain of the forest.
2013-09-26sysdb: sysdb_update_members can take either name or dnPavel Březina2-5/+5
We need to work with distinguish names when processing cross-domain membership, because groups and users may be stored in different sysdb tree. Resolves: https://fedorahosted.org/sssd/ticket/2066
2013-09-24Include header file in implementation module.Lukas Slebodnik1-0/+1
Declarations of public functions was in header files, but header files was not included in implementation file.
2013-09-17simple access test: initialize be_ctx for all testsPavel Březina1-15/+16
Recent simple access provider patches started using be_ctx during access check. This caused segfault in unit tests, since be_ctx wasn't initialized. Resolves: https://fedorahosted.org/sssd/ticket/2034
2013-09-17simple access tests: fix typosPavel Březina1-5/+5
2013-09-12TESTS: Remove unused variableJakub Hrozek1-4/+0
The tmpl variable was only ever used to default to FILE backend in case absolute patch w/o ccache type was selected. Since backends are no longer there, we can remove the variable, too.
2013-09-11Fix formating of variables with type: id_tLukas Slebodnik1-1/+1
2013-09-10DB: Add user/group lookup by SIDOndrej Kos1-19/+32
2013-09-09krb5: Remove unused ccache backend infrastructureSimo Sorce1-23/+0
Remove struct sss_krb5_cc_be and the remaining functions that reference it as they are all unused now. Resolves: https://fedorahosted.org/sssd/ticket/2061
2013-09-09krb5: Unify function to create ccache filesSimo Sorce2-25/+21
Only 2 types (FILE and DIR) need to precreate files or directories on the file system, and the 2 functions were basically identical. Consolidate all in one common function and use that function directly where needed instead of using indirection. Resolves: https://fedorahosted.org/sssd/ticket/2061
2013-09-09krb5: Use krb5_cc_destroy to remove old ccachesSimo Sorce1-1/+1
This completely replaces the per-ccache-type custom code to remove old cacches and instead uses libkrb5 base doperations (krb5_cc_destroy) and operating as the user owner. Resolves: https://fedorahosted.org/sssd/ticket/2061
2013-09-09tests: Add dlopen test to make sure modules worksSimo Sorce1-0/+159
This tests dlopens and resolves all symbols to make sure there are no missing symbols in our provider modules.
2013-09-09krb5: Ingnore unknown expansion sequencesSimo Sorce1-0/+30
Recently support was added to use also libkrb5 style expansions that uses a %{varname} type of template. There are a number of templates we do not care/can't expand in sssd. The current code misses tests and failed to properly preserve some of the templates we do not want to handle. Addiotionally in order to be future proof this patch treats unknown templates as pass-through templates and defer any error checking to libkrb5, so that sssd is consistent with how kinit would behave. Resolves: https://fedorahosted.org/sssd/ticket/2076
2013-09-05utils: add is_host_in_domain()Pavel Březina1-0/+28
2013-09-05resolv_sort_srv_reply: remove unnecessary mem_ctxPavel Březina1-2/+2
2013-09-05krb5_utils tests: fix some typosPavel Březina1-8/+8
2013-09-03UTIL: Use standard maximum value of type size_tLukas Slebodnik1-6/+6
It is better to use standard constant for maximum value of type size_t, instead of reinventing wheel with own defined constant SIZE_T_MAX This patch replace string "SIZE_T_MAX" -> "SIZE_MAX"
2013-08-28Read enumerate state for subdomains from cacheJakub Hrozek1-3/+3
The enumerate flag will be read from the cache for subdomains and the domain object will be created accordingly.
2013-08-28SYSDB: Store enumerate flag for subdomainJakub Hrozek1-5/+7
2013-08-22KRB5: Add new #define for collection cache typesStephen Gallagher2-6/+6
Kerberos now supports multiple types of collection caches, not just DIR: caches. We should add a macro for generic collection behavior and use that where appropriate.
2013-08-19sysdb_add_incomplete_group: store SID string is availableSumit Bose1-4/+45
During initgroups request we read the SID of a group from the server but do not save it to the cache. This patch fixes this and might help to avoid an additional lookup of the SID later.
2013-08-07add simple access provider init testPavel Březina1-0/+98
2013-07-25resolv-tests failing with memory leakMichal Zidek1-2/+4
Wait for c-ares to finish before checking for memory leaks. https://fedorahosted.org/sssd/ticket/1899
2013-07-19AD: Set the bool value same as default value in optsJakub Hrozek1-0/+69
https://fedorahosted.org/sssd/ticket/2023 When the option values are copied using dp_opt_copy_map, the .val member is used if it's not NULL. At the same time, the bool options are never NULL, unlike integers or strings that can have special NULL-like values such as NULL_STRING. This effectively means that when copying a bool option, the .val member is always used. But in the AD maps, some .val fields were set differently from the .def_val fields. The effect was that when the AD subdomain provider was initialized from IPA subdomain provider using only the defaults, some options (notably referral chasing) were set to a value that didn't make sense for the AD provider. This patch makes sure that for all boolean option, the .val is always the same as .def_val.
2013-07-19Fix clang format string warning.Lukas Slebodnik1-1/+1
warning: format string is not a string literal (potentially insecure) [-Wformat-security]
2013-07-17dyndns timeout test: catch SIGCHLD handler eventsPavel Březina1-0/+12
https://fedorahosted.org/sssd/ticket/1992 dyndns test will crash with this patch
2013-07-09Do not copy special files when creating homedirOndrej Kos1-5/+3
https://fedorahosted.org/sssd/ticket/1778 When trying to copy special file, only message is logged now.
2013-07-09DB: sysdb_search_user_by_name: search by both name and aliasJakub Hrozek1-4/+19
2013-06-28Read mpg state for subdomains from cacheSumit Bose1-3/+6
The mpg flag will be read from the cache for subdomains and the domain object will be created accordingly.
2013-06-28Save mpg state for subdomainsSumit Bose1-5/+8
The information of a subdomain will use magic private groups (mpg) or not will be stored together with other information about the domain in the cache.
2013-06-28Add cmocka based tests for libsss_idmapSumit Bose1-0/+421
This patch implements some unit tests for the recent enhancements to libsss_idmap.
2013-06-10Fix dereference after a NULL check in tests.Lukas Slebodnik1-6/+20
https://fedorahosted.org/sssd/ticket/1972 Coverity IDs: 11870,11871 Do not call unlink with NULL pointer.
2013-06-06Enhance PAC responder for AD usersSumit Bose1-524/+0
This patch modifies the PAC responder so that it can be used with the AD provider as well. The main difference is that the POSIX UIDs and GIDs are now lookup up with the help of the SID instead of being calculated algorithmically. This was necessary because the AD provider allows either algorithmic mapping or reading the value from attributes stored in AD. Fixes https://fedorahosted.org/sssd/ticket/1558
2013-05-30Allow flat name in the FQname formatJakub Hrozek2-5/+423
https://fedorahosted.org/sssd/ticket/1648 Adds another expansion in the printf format that allows the user to use the domain flat name in the format.
2013-05-30Remove empty directories after tests run.Lukas Slebodnik3-27/+12
Empty directory tests_path is removed in function test_dom_suite_cleanup. Function test_dom_suite_cleanup is reused in other tests.
2013-05-30Making order in tests.Lukas Slebodnik2-1/+0
--removed duplicated test-io --reusing library libsss_test_common in other tests --cmocka test sss_nss_idmap-tests was moved to cmocka dir --moved leak_check.c to libsss_test_common --moved common_tev.c,common_dom.c to libsss_test_common (leak_check.c,common_tev.c,common_dom.c) are test framework independent
2013-05-27Fix dyndns timer initializationJakub Hrozek1-1/+5
The dyndns init function was starting the timer even if the updates were set to False. This patch splits the init of dynamic updates and the timer into two functions so that the back end can start the updates separately from reading the options.
2013-05-13tests: Do not set cwd twiceJakub Hrozek1-1/+0
The tests_set_cwd() function was called twice in the dyndns unit test.
2013-05-03Active Directory dynamic DNS updatesJakub Hrozek1-0/+6
https://fedorahosted.org/sssd/ticket/1504 Implements dynamic DNS updates for the AD provider. By default, the updates also update the reverse zone and run periodically every 24 hours.
2013-05-03dyndns: new option dyndns_authJakub Hrozek1-0/+3
This options is mostly provided for future expansion. Currently it is undocumented and both IPA and AD dynamic DNS updates default to GSS-TSIG. Allowed values are GSS-TSIG and none.
2013-05-03dyndns: new option dyndns_force_tcpJakub Hrozek1-3/+3
https://fedorahosted.org/sssd/ticket/1831 Adds a new option that can be used to force nsupdate to only use TCP to communicate with the DNS server.
2013-05-03resolver: Return PTR record as stringJakub Hrozek1-0/+104
This is a requirement to update the PTR records. Includes a unit test.
2013-05-03dyndns: new option dyndns_refresh_intervalJakub Hrozek1-2/+83
This new options adds the possibility of updating the DNS entries periodically regardless if they have changed or not. This feature will be useful mainly in AD environments where the Windows clients periodically update their DNS records.
2013-05-03Convert IPA-specific options to be back-end agnosticJakub Hrozek1-1/+1
This patch introduces new options for dynamic DNS updates that are not specific to any back end. The current ipa dyndns options are still usable, just with a deprecation warning.
2013-05-03Refactor dynamic DNS updatesJakub Hrozek4-8/+367
Provides two new layers instead of the previous IPA specific layer: 1) dp_dyndns.c -- a very generic dyndns layer on the DP level. Its purpose it to make it possible for any back end to use dynamic DNS updates. 2) sdap_dyndns.c -- a wrapper around dp_dyndns.c that utilizes some LDAP-specific features like autodetecting the address from the LDAP connection. Also converts the dyndns code to new specific error codes.
2013-05-03Add client library for SID related lookupsSumit Bose1-0/+118
This patch add a library for client side lookups for a SID or with a SID through the calls: - sss_nss_getsidbyname - sss_nss_getsidbyid - sss_nss_getnamebysid - sss_nss_getidbysid The library is called libsss_nss_idmap and the contributed spec file will create two new packages libsss_nss_idmap and libsss_nss_idmap-devel.
2013-05-02Fix segmentation fault in test_io.Abhishek Singh1-4/+19
tests_set_cwd is used and relativepath calculation method is changed and is made general based on basedir.