summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* LDAP: return sdap search return code to IDJakub Hrozek2013-06-075-50/+126
| | | | | | | | By default, the LDAP searches delete the entry from cache if it wasn't found during a search. But if a search wants to try both Global Catalog and LDAP, for example, it might be beneficial to have an option to only delete the entry from cache after the last operation fails to prevent unnecessary memberof operations for example.
* LDAP: new SDAP domain structureJakub Hrozek2013-06-0725-145/+315
| | | | | | | | | | | Previously an sdap_id_ctx was always tied to one domain with a single set of search bases. But with the introduction of Global Catalog lookups, primary domain and subdomains might have different search bases. This patch introduces a new structure sdap_domain that contains an sssd domain or subdomain and a set of search bases. With this patch, there is only one sdap_domain that describes the primary domain.
* LDAP: Pass in a connection to ID functionsJakub Hrozek2013-06-078-31/+64
| | | | | | | Instead of using the default connection from the sdap_id_ctx, allow the caller to specify which connection shall be used for this particular request. Again, no functional change is present in this patch, just another parameter is added.
* LDAP: Refactor account info handler into a tevent requestJakub Hrozek2013-06-072-163/+210
| | | | | | | | | | | | The sdap account handler was a function with its own private callback that directly called the back end handlers. This patch refactors the handler into a new tevent request that the current sdap handler calls. This refactoring would allow the caller to specify a custom sdap connection for use by the handler and optionally retry the same request with another connection inside a single per-provider handler. No functional changes are present in this patch.
* LDAP: sdap_id_ctx might contain several connectionsJakub Hrozek2013-06-0723-115/+175
| | | | | | | | | | | | | | | | | | | With some LDAP server implementations, one server might provide different "views" of the identites on different ports. One example is the Active Directory Global catalog. The provider would contact different view depending on which operation it is performing and against which SSSD domain. At the same time, these views run on the same server, which means the same server options, enumeration, cleanup or Kerberos service should be used. So instead of using several different failover ports or several instances of sdap_id_ctx, this patch introduces a new "struct sdap_id_conn_ctx" that contains the connection cache to the particular view and an instance of "struct sdap_options" that contains the URI. No functional changes are present in this patch, currently all providers use a single connection. Multiple connections will be used later in the upcoming patches.
* Do not obfuscate calls with booleansJakub Hrozek2013-06-074-31/+93
| | | | | | Instead of using boolean variables to denote whether the call is adding a primary or a secondary server, use a function wrapper that tells what it's doing by its name.
* Implicitly activate the PAC responder for AD providerSumit Bose2013-06-061-1/+2
|
* Always send the PAC to the PAC responderSumit Bose2013-06-061-20/+18
| | | | | | | | | | | Currently while doing a Kerberos based authentication the PAC was only send to the PAC responder for principals from a different realm. This reflects the FreeIPA use case of users from trusted domains. This restriction does not make sense anymore when the data from the PAC should be used for the AD provider as well. It also makes only limited sense for the IPA use case, because when using GSSAPI the PAC of users from the local IPA domain are already evaluated by the PAC responder.
* Intermittent fix for get_user_and_group_users_doneSumit Bose2013-06-061-3/+0
| | | | | | | | | | | users_get_recv() never returns ENOENT. In general it should return EOK in the case no matching user was found. But since I forget to handle a SID based filter properly in sdap_get_users_process() an error is returned in this case which makes get_user_and_group_users_done() work as expected with this patch. There is an upcoming enhancement to users_get_recv() which I'm planning to use for a full fix.
* Enhance PAC responder for AD usersSumit Bose2013-06-066-1476/+716
| | | | | | | | | | | 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
* Read SIDs of groups with sysdb_initgroups() as wellSumit Bose2013-06-061-0/+1
|
* Use queue for get_subdomainsSumit Bose2013-06-041-3/+7
| | | | | | | | | | | It does not make much sense to run multiple get_subdomains request in parallel because all requests will load the same information from the server. The IPA and AD provider already implement a short timeout to avoid the multiple requests are running to fast after each other. But if the timeout is over chances are that if two or more request come in fast the first request cannot update the timeout and request will run in parallel. To avoid this the requests are queued and send one after the other to the provider.
* Add be request queueSumit Bose2013-06-042-0/+130
| | | | | | | For some backend targets it might be not desirable to run requests in parallel but to serialize them. To avoid that each provider has to implement a queue for this target this patch implements a generic queue which collects incoming requests before they are send to the target.
* Lookup domains at startupSumit Bose2013-06-048-0/+89
| | | | | | | | | | | | To make sure that e.g. the short/NetBIOS domain name is available this patch make sure that the responders send a get_domains request to their backends at startup the collect the domain information or read it from the cache if the backend is offline. For completeness I added this to all responders even if they do not need the information at the moment. Fixes https://fedorahosted.org/sssd/ticket/1951
* Use deep copy for dns_domain and discovery_domainLukas Slebodnik2013-06-031-2/+4
| | | | https://fedorahosted.org/sssd/ticket/1929
* Set canonicalize flag if enterprise principals are usedSumit Bose2013-05-311-1/+6
| | | | | | | In contrast to MIT KDCs AD does not automatically canonicalize the enterprise principal in an AS request but requires the canonicalize flags to be set. To be on the safe side we always enable canonicalization if enterprise principals are used.
* Prevent segfault while processing ASQ requestLukas Slebodnik2013-05-301-0/+6
| | | | https://fedorahosted.org/sssd/ticket/1950
* MAN: state default dyndns interfaceOndrej Kos2013-05-302-2/+8
| | | | https://fedorahosted.org/sssd/ticket/1924
* Remove branching to improve readabilityJakub Hrozek2013-05-301-23/+11
|
* Allow flat name in the FQname formatJakub Hrozek2013-05-306-24/+564
| | | | | | | 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.
* Check the validity of FQname format prior to using itJakub Hrozek2013-05-301-3/+43
| | | | | | Adds a sanity check of the fqname pattern. Fails if the username pattern is not specified at all and warns if the domain pattern is not specified.
* Add utility functions for formatting fully-qualified namesJakub Hrozek2013-05-308-44/+70
| | | | | | Instead of using printf-like functions directly, provide two wrappers that would encapsulate formatting the fully-qualified names. No functional change is present in this patch.
* Remove empty directories after tests run.Lukas Slebodnik2013-05-303-27/+12
| | | | | Empty directory tests_path is removed in function test_dom_suite_cleanup. Function test_dom_suite_cleanup is reused in other tests.
* Making order in tests.Lukas Slebodnik2013-05-302-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
* AD dyndns: extract the host name from URIJakub Hrozek2013-05-281-9/+31
|
* FO: Fix setting status of duplicatesJakub Hrozek2013-05-281-9/+18
|
* Remove unneeded commentJakub Hrozek2013-05-281-1/+0
|
* IPA: Check for ENOMEMJakub Hrozek2013-05-281-0/+3
|
* Fix dyndns timer initializationJakub Hrozek2013-05-277-11/+39
| | | | | | | 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.
* Fail with misconfigured id-mapping rangesOndrej Kos2013-05-271-1/+2
| | | | | | | | | | https://fedorahosted.org/sssd/ticket/1930 On misconfigured id-mapping range variables, the provider should not start. We were internally correctly setting error code for failure, but interruption of startup was not performed. Also raised the debug level of message for this misconfiguration.
* Add SID related requests to the LDAP providerSumit Bose2013-05-271-5/+230
| | | | | | | | | | | The patch adds support for BE_REQ_BY_SECID and BE_REQ_USER_AND_GROUP to the LDAP provider. Since the AD and the IPA provider use the same code they support those request now as well. Besides allowing that users and groups can be searched by the SID as well the new request allows to search users and groups in one run, i.e. if there is not user matching the search criteria groups are searched as well.
* IPA: read user and group SIDSumit Bose2013-05-271-2/+2
| | | | | To allow mapping of SIDs to names or POSIX IDs and back the related attributes must be read from the FreeIPA directory server.
* Handle SID strings in sdap_attrs_get_sid_str() as wellSumit Bose2013-05-271-9/+20
| | | | | | | This patch add a basic check if the SID returned by the LDAP server is in a string representation. If not it is assumed that a binary SID was returned by the LDAP server which is converted into a string representation which is returned to the caller.
* IPA: Always initialize ID mappingSumit Bose2013-05-271-4/+10
| | | | | Because we now always want to store SIDs in the IPA provider, we also need to always initialize the ID mapping context.
* Add a domain config attribute for realmdStef Walter2013-05-233-2/+14
| | | | | realmd needs to be able to tag various domains with basic info when it configures a domain.
* Add 'description' attribute to SSSDConfig APIStephen Gallagher2013-05-232-1/+4
| | | | It was mentioned in the manpages, but not accepted by the API
* Adding option to disable retrieving large AD groups.Lukas Slebodnik2013-05-2311-13/+74
| | | | | | | | | This commit adds new option ldap_disable_range_retrieval with default value FALSE. If this option is enabled, large groups(>1500) will not be retrieved and behaviour will be similar like was before commit ae8d047122c "LDAP: Handle very large Active Directory groups" https://fedorahosted.org/sssd/ticket/1823
* Removing unused functions.Lukas Slebodnik2013-05-232-36/+0
| | | | This patch remove unused functions sdap_parse_user and sdap_parse_group
* pysss_nss_idmap: do not treat strings as sequencesSumit Bose2013-05-231-1/+1
| | | | | | | | The current PySequence_Check() also catches single strings with the effect that the string is split into characters which are send as arguments to SSSD individually. With this patch only tuples and lists are treated as sequences.
* Fix return code for AD subdomain requestSumit Bose2013-05-221-1/+3
|
* Check NSCD configuration fileOndrej Kos2013-05-214-6/+171
| | | | | | | | | | | | | | | https://fedorahosted.org/sssd/ticket/1785 nscd.conf file is now checked for the presence of caching settings for databases controlled by SSSD. Syslog warning is now written only if NSCD is running with interfering configuration or if configuration file couldn't be loaded. New configure option added to support non-standard locations --with-nscd-conf=PATH (defaultly set to /etc/nscd.conf) This is just a workaround until the following bugzilla is resolved: https://bugzilla.redhat.com/show_bug.cgi?id=963908
* Move nscd.c from tools to utilOndrej Kos2013-05-213-8/+8
| | | | | | Preparation for the following patch which will include the nscd.c in the monitor code due to newly introduced function for checking the nscd configuration file.
* DB: Fix segfault when configuration file cannot be parsedOndrej Kos2013-05-211-0/+1
| | | | https://fedorahosted.org/sssd/ticket/1934
* Remove unneeded parameter of setup_child and namespace itJakub Hrozek2013-05-205-5/+5
| | | | | setup_child() was accepting a parameter it didn't use. Also the function name was too generic, so I added a sdap prefix.
* Fixing critical format string issues.Lukas Slebodnik2013-05-2022-36/+61
| | | | | | --missing arguments. --format '%s', but argument is integer. --wrong format string, examle: '%\n'
* Fix segfault in AD Subdomains ModuleLukas Slebodnik2013-05-151-0/+2
| | | | | | In function ad_subdomains_get_netlogon_done: If variable "reply_count" is zero then variable "reply" will not be initialized. Therefore we should not continue.
* Rename SAFEALIGN macros.Michal Zidek2013-05-143-95/+113
| | | | | | | | | | | | | https://fedorahosted.org/sssd/ticket/1772 SAFEALIGN macros have been renamed in this patch to make it easy to pick the right macro when data is copied from byte buffer to a variable or vice versa. The renamed macros are placed in new header file to avoid code duplication (the old ones were defined in two files, one for the client code and one for the rest of sssd).
* man: Note that IPA updates are secured with GSS-TSIGJakub Hrozek2013-05-141-1/+2
|
* man: Clarify the AD site discovery documentationJakub Hrozek2013-05-141-1/+3
| | | | https://fedorahosted.org/sssd/ticket/1909
* Fix segfault in DYNDNSOndrej Kos2013-05-141-1/+1
| | | | Added missing variable in DEBUG macro call.