summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add exit status section to sss_ssh_* man pagesJan Cholasta2013-04-232-0/+16
|
* tests: Link the simple access tests with -ldlJakub Hrozek2013-04-221-0/+1
| | | | | | | | | | | | | | | | | | | | In SSSD, we use dlopen() and dlsym() in two files src/providers/data_provider_be.c and src/providers/proxy/proxy_init.c. Hence we should explicitly link with -ldl also in simple_access-tests. SSSD can be compiled with two crypto libraries nss or libcrypto. NSS has dependency nspr which depends on "libdl and libpthread" This is a reason why compilation of test did not fail even if -ldl was not explicitly added to simple_access_tests_LDADD. But libcrypto doesn't depend on libdl, so in this case compilation of tests will not be successful. Upstream nspr 4.9 has two ways have to obtain metainformation about libraries pkg-config and own script nspr-config. First one doesn't list "-ldl" "-lpthread" but second one lists both "-ldl" "-lpthread" That's also why the Ubuntu maintainer found this bug -- Fedora has got patched version of nspr, but Debian (Ubuntu) doesn't
* Allow usage of enterprise principalsSumit Bose2013-04-2216-7/+93
| | | | | | | | | | | | | | | | | | | | | | | | Enterprise principals are currently most useful for the AD provider and hence enabled here by default while for the other Kerberos based authentication providers they are disabled by default. If additional UPN suffixes are configured for the AD domain the user principal stored in the AD LDAP server might not contain the real Kerberos realm of the AD domain but one of the additional suffixes which might be completely randomly chooses, e.g. are not related to any existing DNS domain. This make it hard for a client to figure out the right KDC to send requests to. To get around this enterprise principals (see http://tools.ietf.org/html/rfc6806 for details) were introduced. Basically a default realm is added to the principal so that the Kerberos client libraries at least know where to send the request to. It is not in the responsibility of the KDC to either handle the request itself, return a client referral if he thinks a different KDC can handle the request or return and error. This feature is also use to allow authentication in AD environments with cross forest trusts. Fixes https://fedorahosted.org/sssd/ticket/1842
* Refactoring: remove duplicated code in nss responderSumit Bose2013-04-212-622/+240
| | | | | Different user and group lookup requests used nearly identical code, this patch unifies some of the related code paths.
* Fix and rename get_my_domain_data()Sumit Bose2013-04-213-12/+14
| | | | | | | | | | | | | | | | | The task of get_my_domain_data() is to read some information about the configured domain from the cache. While the sysdb interface was redesigned some changes changed the behaviour so that the data of the domain of the current request was read. If this domain is a sub-domain the wrong data was read. As a result group-memberships of the configured domain were not taken into account. The original code didn't made it easy to see that always the parent domain should be used here, because there was no comment indication this and the function name get_my_domain_data() didn't made it clear either. Additionally to fixing the issue this patch also adds a comment and rename the function to get_parent_domain_data(). Fixes https://fedorahosted.org/sssd/ticket/1888
* Convert the simple access check to new error codesJakub Hrozek2013-04-191-9/+17
| | | | | | | | https://fedorahosted.org/sssd/ticket/453 It makes sense to keep using the boolean for access granted/denied, but when the user/group is not found, the request would now return ERR_ACCOUNT_UNKNOWN
* LDAP: do not invalidate pointer with realloc while processing ghost usersJakub Hrozek2013-04-191-3/+13
| | | | | | | | | | | | | https://fedorahosted.org/sssd/ticket/1799 One peculiarity of the sysdb_attrs_get_el interface is that if the attribute does not exist, then the attrs array is reallocated and the element is created. But in case other pointers are already pointing into the array, the realloc might invalidate them. Such case was in the sdap_process_ghost_members function where if the group had no members, the "gh" pointer requested earlier might have been invalidated by the realloc in order to create the member element.
* tests: Fix the order of key/valuesJakub Hrozek2013-04-181-2/+3
|
* Make leak checks usable in tests that do not utilize checkJakub Hrozek2013-04-1713-139/+240
| | | | | | * Remove check-specific failure reporting from common_check.c * Check-specific abstraction over memleak checks * Rename common_check.c to leak_check.c
* Inform about function duplication.Michal Zidek2013-04-172-0/+6
| | | | | | | | | | | | | | | sss_mc_set_recycled is a static function, that should not be used outside nsssrv_mmap_cache.c. The sss_cache tool is an exception, because in the case when sssd is not running, sss_cache must invalidate the memory cache file. That is why sss_mc_set_recycled was copied to the tools_mc_util.c (as helper function for sss_memcache_invalidate function). It was duplicated to allow this function to remain static (and invisible to any .h files), so that it is not used anywhere else. Wrong usage of this function might cause race conditions and corrupt the cache. I'll add comments about the duplication to the code.
* Fix simple access group control in case-insensitive domainsJakub Hrozek2013-04-152-18/+11
| | | | | | | | | https://fedorahosted.org/sssd/ticket/1713 In the simple access provider, we need to only canonicalize user names when comparing with values in the ACL, not when searching the cache. The sysdb searches might do a base search with a DN constructed with the username which fails if the username is lower case.
* sss_cache: Remove annoying messagesMichal Zidek2013-04-151-8/+6
| | | | | | When requested entry was not found in one domain, an ERROR message was written to the user even if the entry was found in the next domain and deleted properly.
* sss_cache: support for subdomainsMichal Zidek2013-04-151-57/+117
| | | | https://fedorahosted.org/sssd/ticket/1741
* Confusing error messages for invalid sssd.confAriel Barria2013-04-121-9/+11
| | | | | | | https://fedorahosted.org/sssd/ticket/1625 Amending errors messages and add other error codes to be more specific and avoid confusion.
* Fix krbcc dir creation issue with MIT krb5 1.11Lukas Slebodnik2013-04-122-11/+61
| | | | | | | | | | | | | | | | In krb5-libs >= 1.11, function krb5_cc_resolve verify if credential cache dir exists. If it doesn't exist, than it will be created with process permissions and not user permissions. Function cc_residual_is_used has already checked for non existing directory, but it wasn't considered to be a failure and therefore next call of krb5_init_context will create directory with wrong permissions. Now if directory doesn't exist, it will be handled like there was not ccache attribute in sysdb cache. We also check if "primary" file in ccache directory has right permissions. But we ignore missing "primary" file. https://fedorahosted.org/sssd/ticket/1822
* Incorrect *.py[co] files placementLukas Slebodnik2013-04-101-4/+18
| | | | | | | | Package sssd contains python files. Python files should be installed in noarch package, therefore all python files from directory src/config/SSSDConfig was moved to new noarch package python-sssdconfig. https://fedorahosted.org/sssd/ticket/1839
* DNS sites support - add IPA SRV pluginPavel Březina2013-04-109-5/+399
| | | | https://fedorahosted.org/sssd/ticket/1032
* DNS sites support - use SRV DNS lookup plugin in all providersPavel Březina2013-04-103-0/+29
| | | | | | | | | | | | | https://fedorahosted.org/sssd/ticket/1032 We set a plugin during an initialization of ID provider, which is an authoritative provider for a plugin choice. The plugin is set only once. When other provider is initalized (e.g. id = IPA, sudo = LDAP), we do not overwrite the plugin. Since sssm_*_id_init() is called from all module constructors, this patch relies on the fact, that ID provider is initialized before all other providers.
* DNS sites support - replace SRV lookup code with a plugin callPavel Březina2013-04-101-258/+73
| | | | | | | | https://fedorahosted.org/sssd/ticket/1032 Removes hard coded SRV lookup code with a plugin call. This patch breaks SRV lookups as there is currently no plugin in use. It is fixed in next patch.
* fail over - add function to insert multiple servers to the listPavel Březina2013-04-101-10/+101
|
* DNS sites support - SRV DNS lookup pluginPavel Březina2013-04-105-0/+522
| | | | | | | | | | | https://fedorahosted.org/sssd/ticket/1032 This plugin mimics the current behaviour. If discovery_domain is set it is the only domain that is tried. If discovery_domain is not set, we try to autodetect domain first and if that fails or SRV lookup on this domain fails, we fallback to SSSD domain name.
* DNS sites support - SRV lookup plugin interfacePavel Březina2013-04-108-0/+140
| | | | | | | | | | | | | https://fedorahosted.org/sssd/ticket/1032 Introduces two new error codes: - ERR_SRV_NOT_FOUND - ERR_SRV_LOOKUP_ERROR Since id_provider is authoritative in case of SRV plugin choise, ability to override the selected pluging during runtime is not desirable. We rely on the fact that id_provider is initialized before all other providers, thus the plugin is set correctly.
* resolv: add resolv_discover_srv request to resolv utilsPavel Březina2013-04-102-0/+194
|
* resolv: add resolv_get_domain request to resolv utilsPavel Březina2013-04-103-1/+170
|
* cmocka unittest for io addedAbhishek Singh2013-04-102-1/+167
|
* cmocka unittest for find_uid addedAbhishek Singh2013-04-102-1/+125
|
* Allow using flatname for subdomain home dir templateJakub Hrozek2013-04-106-9/+33
| | | | https://fedorahosted.org/sssd/ticket/1609
* Put the override_homedir into an included xml fileJakub Hrozek2013-04-103-141/+56
| | | | | The description was duplicated on two places, leading to errors where one was amended but the other was not.
* LDAP: Always fail if a map can't be foundJakub Hrozek2013-04-091-4/+2
|
* Allocate PAM DP request data on responder contextJakub Hrozek2013-04-083-5/+54
| | | | | | | | | | | | https://fedorahosted.org/sssd/ticket/1869 Currently the private data passed to the PAM request is a structure allocated on the client context. But in the odd case where the back end would be stopped or stuck until the idle timeout hits, the DP callback would access data that were freed when the client timed out. This patch introduces a new structure allocated on responder context, whose only purpose is to live as long as the request is active.
* Wrong condition after waitpid.Michal Zidek2013-04-051-1/+1
| | | | On success, waitpid() returns pid of terminated child, not 0.
* Check for waitpid failure at wrong place.Michal Zidek2013-04-052-10/+9
| | | | | | Coverity bugs. https://fedorahosted.org/sssd/ticket/1865
* Check for the correct variablesJakub Hrozek2013-04-051-2/+2
| | | | https://fedorahosted.org/sssd/ticket/1864
* Further restrict become_user drop of privileges.Simo Sorce2013-04-051-15/+18
| | | | | | | | | | | | | | | | We never need to regain root after we call become_user() so tighten up even further our privilege drop. Add a setgroups() call to remove all secondary groups root may have been given for whateve reason. Then use the setres[ug]id function to also drop the saved uid/gid so the process cannot regain back root id. Capabilities are also implicitly dropped here, no more CAP_SETUID so this is a Point of No Return, once changed to non-root the process can't get back. Remove redefinition of sys/types.h and unistd.h, they are already defined in util.h and they need to be included after _GNU_SOURCE/_BSD_SOURCE is defined or the prototypes for setres[ug]id will not be found. Add grp.h after util.h for the same reason.
* dyndns: Fix initializing sdap_id_ctxJakub Hrozek2013-04-041-1/+1
|
* LDAP: Fix value initialization warningsLukas Slebodnik2013-04-042-2/+2
|
* Centralize resolv_init, remove resolv context listJakub Hrozek2013-04-035-43/+7
|
* Init failover with be_res optionsJakub Hrozek2013-04-039-131/+125
|
* Allow setting krb5_renew_interval with a delimiterAriel Barria2013-04-039-13/+59
| | | | | | | https://fedorahosted.org/sssd/ticket/902 changed the data type the krb5_renew_interval to string. function krb5_string_to_deltat is used to convert and allow delimiters
* Check for correct variable nameJakub Hrozek2013-04-036-9/+5
| | | | https://fedorahosted.org/sssd/ticket/1864
* Return errno, not -1 on failure in files.cJakub Hrozek2013-04-031-0/+1
| | | | https://fedorahosted.org/sssd/ticket/1862
* Fix potential out-of-bounds write in sss_idmap_sid_to_dom_sidJakub Hrozek2013-04-031-1/+1
| | | | https://fedorahosted.org/sssd/ticket/1861
* pidfile(): Do not leak fd on errorJakub Hrozek2013-04-031-0/+1
| | | | https://fedorahosted.org/sssd/ticket/1860
* krb5 child: Use the correct type when processing OTPJakub Hrozek2013-04-031-1/+1
|
* Fix typos in man pagesYuri Chornoivan2013-04-032-2/+2
|
* Updating the version for the 1.10 beta1 releaseJakub Hrozek2013-04-021-1/+1
|
* Updating the translations for the 1.10 alpha releasesssd-1_9_91sssd-1_10_alpha1Jakub Hrozek2013-04-0239-14769/+39742
|
* Improve syslog message when configuration cannot be loadedAriel Barria2013-04-021-1/+3
| | | | | | https://fedorahosted.org/sssd/ticket/1414 Error code was added and strerror(errno) to show cause in sss_log
* Making the authtok structure really opaque.Lukas Slebodnik2013-04-0219-137/+186
| | | | | | | | | | | | | | | | | | | | Definition of structure sss_auth_token was removed from header file authtok.h and there left only declaration of this structure. Therefore only way how to use this structure is to use accessory function from same header file. To creating new empty authotok can only be used newly created function sss_authtok_new(). TALLOC context was removed from copy and setter functions, because pointer to stuct sss_auth_token is used as a memory context. All declaration of struct sss_auth_token variables was replaced with pointer to this structure and related changes was made in source code. Function copy_pam_data can copy from argument src which was dynamically allocated with function create_pam_data() or zero initialized struct pam_data allocated on stack. https://fedorahosted.org/sssd/ticket/1830
* Reusing create_pam_data() on the other places.Lukas Slebodnik2013-04-025-4/+16
| | | | | | Function create_pam_data() should be only one way how to create new struct pam_data, because it also initialize destructor to created object.