summaryrefslogtreecommitdiffstats
path: root/src/providers/ipa/ipa_netgroups.c
Commit message (Collapse)AuthorAgeFilesLines
* LDAP: Make it possible to extend an attribute mapJakub Hrozek2014-05-021-1/+2
| | | | | | | | | | | | | | | | | https://fedorahosted.org/sssd/ticket/2073 This commit adds a new option ldap_user_extra_attrs that is unset by default. When set, the option contains a list of LDAP attributes the LDAP provider would download and store in addition to the usual set. The list can either contain LDAP attribute names only, or colon-separated tuples of LDAP attribute and SSSD cache attribute name. In case only LDAP attribute name is specified, the attribute is saved to the cache verbatim. Using a custom SSSD attribute name might be required by environments that configure several SSSD domains with different LDAP schemas. Reviewed-by: Simo Sorce <simo@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* IPA: Use function sysdb_attrs_get_el in safe wayLukas Slebodnik2014-03-311-10/+7
| | | | | | | | | | | | | | | | | | | | Function sysdb_attrs_get_el can enlarge array of ldb_message_element in "struct sysdb_attrs" if attribute is not among available attributes. Array will be enlarged with function talloc_realloc but realloc can move array to another place in memory therefore ldb_message_element should not be used after next call of function sysdb_attrs_get_el sysdb_attrs_get_el(netgroup, SYSDB_ORIG_MEMBER_USER, &user_found); sysdb_attrs_get_el(netgroup, SYSDB_ORIG_MEMBER_HOST, &host_found); With netgroups, it is common to omit user or host from netgroup triple. There is very high probability that realloc will be called. it is possible pointer user_found can refer to the old area after the second call of function sysdb_attrs_get_el. Resolves: https://fedorahosted.org/sssd/ticket/2284 Reviewed-by: Sumit Bose <sbose@redhat.com>
* Update DEBUG* invocations to use new levelsNikolai Kondrashov2014-02-121-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a script to update DEBUG* macro invocations, which use literal numbers for levels, to use bitmask macros instead: grep -rl --include '*.[hc]' DEBUG . | while read f; do mv "$f"{,.orig} perl -e 'use strict; use File::Slurp; my @map=qw" SSSDBG_FATAL_FAILURE SSSDBG_CRIT_FAILURE SSSDBG_OP_FAILURE SSSDBG_MINOR_FAILURE SSSDBG_CONF_SETTINGS SSSDBG_FUNC_DATA SSSDBG_TRACE_FUNC SSSDBG_TRACE_LIBS SSSDBG_TRACE_INTERNAL SSSDBG_TRACE_ALL "; my $text=read_file(\*STDIN); my $repl; $text=~s/ ^ ( .* \b (DEBUG|DEBUG_PAM_DATA|DEBUG_GR_MEM) \s* \(\s* )( [0-9] )( \s*, ) ( \s* ) ( .* ) $ / $repl = $1.$map[$3].$4.$5.$6, length($repl) <= 80 ? $repl : $1.$map[$3].$4."\n".(" " x length($1)).$6 /xmge; 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>
* Make DEBUG macro invocations variadicNikolai Kondrashov2014-02-121-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* Remove unused parameter from ipa_save_netgroupLukas Slebodnik2013-11-271-2/+1
|
* SYSDB: Drop the sysdb_ctx parameter - module sysdb_ops (part 2)Michal Zidek2013-11-151-1/+1
|
* Fix formating of variables with type: size_tLukas Slebodnik2013-09-111-2/+4
|
* LDAP: new SDAP domain structureJakub Hrozek2013-06-071-5/+5
| | | | | | | | | | | 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.
* Add domain arguments to sysdb_add_inetgroup fns.Simo Sorce2013-01-151-1/+1
|
* netgroup: resolve hostgroup membership correctlyPavel Březina2012-09-121-1/+1
| | | | | | | | https://fedorahosted.org/sssd/ticket/1519 IPA host refactoring changed mapping of memberOf attribute which caused SSSD being unable to retrieve membership of hostgroup when being interpreted as netgroup.
* Add support for filtering atributesJan Zeleny2012-05-311-1/+1
| | | | | This patch adds support for filtering attributes when constructing attribute list from a map for LDAP query.
* LDAP: Add attr_count return value to build_attrs_from_map()Stephen Gallagher2012-05-101-1/+1
| | | | | | | This is necessary because in several places in the code, we are appending to the attrs returned from this value, and if we relied on the map size macro, we would be appending after the NULL terminator if one or more attributes were defined as NULL.
* IPA netgroups: return EOK when there are no netgroups to processJakub Hrozek2012-05-021-0/+1
| | | | If the code fell through the loop, ret would have been random value.
* Delete missing attributes from netgroups to be storedJan Zeleny2012-02-241-1/+1
| | | | https://fedorahosted.org/sssd/ticket/1136
* IPA hosts refactoringJan Zeleny2012-02-241-3/+3
|
* LDAP: Only use paging control on requests for multiple entriesStephen Gallagher2012-02-241-8/+7
| | | | | | | | | | The paging control can cause issues on servers that put limits on how many paging controls can be active at one time (on some servers, it is limited to one per connection). We need to reduce our usage so that we only activate the paging control when making a request that may return an arbitrary number of results. https://fedorahosted.org/sssd/ticket/1202 phase one
* Fixed issue with netgroup update in IPA providerJan Zeleny2012-02-101-24/+34
| | | | | This issue led to a netgroup with one triple (-,-,domain) when it contained no triples on the IPA server.
* Renamed some sysdb constants for their wider usageJan Zeleny2012-02-061-4/+4
|
* NSS: Add individual timeouts for entry typesStephen Gallagher2012-02-041-5/+7
| | | | https://fedorahosted.org/sssd/ticket/1016
* LDAP: Do not fail if RootDSE check cannot determine search basesStephen Gallagher2012-02-041-0/+7
| | | | https://fedorahosted.org/sssd/ticket/1152
* IPA netgroups: Do not reuse loop iterator variableJakub Hrozek2012-01-061-3/+3
|
* Fix uninitialized value error in ipa_netgroups.cStephen Gallagher2011-12-121-0/+1
| | | | | | | DEBUG message can print an unitialized value if the first netgroup has no members. Coverity 12382
* Fixed IPA netgroup processingJan Zeleny2011-12-091-2/+5
| | | | | | | | In case IPA netgroup had indirect member hosts, they wouldn't be detected. This patch also modifies debug messages for easier debugging in the future.
* Fixed logically dead code in netgroup processingJan Zeleny2011-11-281-1/+1
|
* Fixed uninitialized pointer read in netgroups processingJan Zeleny2011-11-281-0/+6
|
* Added support for fetching netgroups in IPA providerJan Zeleny2011-11-231-0/+992