summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_idmap.c
Commit message (Collapse)AuthorAgeFilesLines
* SYSDB: sysdb_idmap_get_mappings returns ENOENTPavel Reichl2014-11-191-1/+1
| | | | | | | | | sysdb_idmap_get_mappings returns ENOENT if no results were found. Part od solution for: https://fedorahosted.org/sssd/ticket/1991 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* Make DEBUG macro invocations variadicNikolai Kondrashov2014-02-121-45/+45
| | | | | | | | | | | | | | | | | | | | | | | | Use a script to update DEBUG macro invocations to use it as a variadic macro, supplying format string and its arguments directly, instead of wrapping them in parens. This script was used to update the code: grep -rwl --include '*.[hc]' DEBUG . | while read f; do mv "$f"{,.orig} perl -e \ 'use strict; use File::Slurp; my $text=read_file(\*STDIN); $text=~s#(\bDEBUG\s*\([^(]+)\((.*?)\)\s*\)\s*;#$1$2);#gs; print $text;' < "$f.orig" > "$f" rm "$f.orig" done Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* sdap_idamp: Fall back to another method if sid is wrongLukas Slebodnik2014-01-221-2/+8
| | | | | | | | | | | sss_idmap_domain_has_algorithmic_mapping can return also IDMAP_SID_INVALID, but it does not mean that idmaping is unavailable. We should fall back to another method of detection (sss_idmap_domain_by_name_has_algorithmic_mapping) and do not return false immediately. Resolves: https://fedorahosted.org/sssd/ticket/2172
* LDAP: update id mapping detection for ldap providerLukas Slebodnik2014-01-221-0/+5
| | | | | | | | For id_provider ldap, it is only necessary to enable option ldap_id_mapping. It is an regression introduced in the commit d3e1d88ce7de3216a862b Resolves: https://fedorahosted.org/sssd/ticket/2172
* SYSDB: Drop the sysdb_ctx parameter from the sysdb_idmap moduleJakub Hrozek2013-11-151-4/+2
|
* sdap_idmap_domain_has_algorithmic_mapping: add domain name argumentSumit Bose2013-10-251-1/+11
| | | | | | | | | | | | | When libss_idmap was only used to algorithmically map a SID to a POSIX ID a domain SID was strictly necessary and the only information needed to find a domain. With the introduction of external mappings there are cases where a domain SID is not available. Currently we relied on the fact that external mapping was always used as a default if not specific information about the domain was found. The lead to extra CPU cycles and potentially confusing debug messages. Adding the domain name as a search parameter will avoid this.
* sdap_idmap: properly handle ranges for external mappingsSumit Bose2013-10-171-24/+44
| | | | | | | | | | | Currently we relied on the fact that external ID mapping is used as default fallback in case of an error and did not properly add subdomains with external ID mapping to the idmap library. If debugging is enabled this leads to irritating debug messages for every user or group lookup. With this patch this subdomains are added to the idmap library. Fixes https://fedorahosted.org/sssd/ticket/2105
* sdap_idmap: add sdap_idmap_get_configured_external_range()Sumit Bose2013-10-171-13/+36
|
* util: add sss_idmap_talloc[_free]Pavel Březina2013-09-171-14/+3
| | | | Remove code duplication.
* Fix formating of variables with type: id_tLukas Slebodnik2013-09-111-5/+7
|
* Add sdap_idmap_domain_has_algorithmic_mapping()Sumit Bose2013-06-281-0/+59
| | | | | | | This patch implements a wrapper for sss_idmap_domain_has_algorithmic_mapping() for the sdap ID mapping. Fixes https://fedorahosted.org/sssd/ticket/1960
* Allow different methods to find new domains for idmappingSumit Bose2013-06-281-3/+20
| | | | | | | | | | | | | | | | | Currently the range management code is in the generic LDAP provider and can be used by the LDAP and AD provider. New ranges are allocated with the help of a hash value of the domain SID. If the IPA provider cannot find a range for a given domain it cannot allocate a new range on its own but has to look up the idrange objects on the FreeIPA server and use them accordingly. To allow the LDAP, AD and IPA provider to use as much common code as possible a plugin interface, similar to the one used to find the DNS site, to find a missing range would be useful. The default plugin will be used by the LDAP and the AD provider and the IPA provider will implement a plugin to read the data from the server. Fixes https://fedorahosted.org/sssd/ticket/1961
* SDAP IDMAP: Add configured domain to idmap contextSumit Bose2013-06-281-0/+70
| | | | | | To allow libsss_idmap to manage all id-ranges the id-ranges of the domains configured in sssd.conf which are currently unmanaged must be added to libsss_idmap.
* 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.
* Re-add a useful DEBUG messageJakub Hrozek2013-05-131-0/+2
| | | | | | | In commit 46222e5191473f9a46aec581273eb2eef22e23be we removed a very similar DEBUG message while moving the whole piece of code to the idmap library. But it turned out that the DEBUG message was useful while testing the functionality, so this patch adds it back.
* libsss_idmap: function to calculate rangeMichal Zidek2013-04-291-107/+54
| | | | | | | | Calculation of range for domains is moved from sdap_idmap code to sss_idmap code. Some refactoring have been done to allow this move. https://fedorahosted.org/sssd/ticket/1844
* Remove sysdb as a be context structure memberSimo Sorce2013-01-211-2/+2
| | | | The sysdb context is already available through the 'domain' structure.
* Add domain argument to sysdb_idmap_ funcitonsSimo Sorce2013-01-151-1/+2
|
* idmap: Silence DEBUG messages when dealing with built-in SIDs.Michal Zidek2012-11-281-7/+18
| | | | | | | | When converting built-in SID to unix GID/UID a confusing debug message about the failed conversion was printed. This patch special cases these built-in objects. https://fedorahosted.org/sssd/ticket/1593
* Slices calculation is alway wrong for default valuesOndrej Kos2012-10-041-2/+2
|
* AD: autorid compatibility should recommend the use of default domainStephen Gallagher2012-09-241-4/+4
| | | | | | | | | | | Previously, we were failing to start if ldap_idmap_autorid_compat was True but the default domain SID was unspecified. This is the recommended configuration, but it is functional without it. There is just a slight risk that the IDs will be inconsistent between machines if the first user requested is not from the default domain. https://fedorahosted.org/sssd/ticket/1530
* LDAP: Add helper function to map IDsStephen Gallagher2012-05-031-0/+62
| | | | | This function will also auto-create a new ID map if the domain has not been seen previously.
* LDAP: Add routine to extract domain SID from an object SIDStephen Gallagher2012-05-031-0/+44
| | | | Also makes the domain prefix macros from sss_idmap public.
* LDAP: Allow setting a default domain for id-mapping slice 0Stephen Gallagher2012-05-031-0/+36
|
* LDAP: Add autorid compatibility modeStephen Gallagher2012-05-031-8/+14
|
* LDAP: Add helper routines for ID-mappingStephen Gallagher2012-05-031-0/+282