67645557dc0301e7ea66bba15c4ff3fb11f9540e |
|
09-Mar-2018 |
Jakub Hrozek <jhrozek@redhat.com> |
IPA: Handle empty nisDomainName
Resolves:
https://pagure.io/SSSD/sssd/issue/3573
If nisdomain=, i.e. a blank NIS domain name, sssd was not processing the
netgroup at all. This is not in agreement with man innetgr which says "Any of
the elements in a triple can be empty, which means that anything matches. The
functions described here allow access to the netgroup databases".
This patch instead returns an empty domain as well, which eventually
produces the same output as if the netgroup was requested from the
compat tree.
To reproduce the bug:
$ ipa netgroup-add
Netgroup name: emptydom
-------------------------
Added netgroup "emptydom"
-------------------------
Netgroup name: emptydom
NIS domain name: ipa.test
IPA unique ID: 164bc15a-f4b3-11e7-acdb-525400ca6df3
$ ipa netgroup-add-member
Netgroup name: emptydom
[member user]: admin
[member group]:
[member host]:
[member host group]:
[member netgroup]:
Netgroup name: emptydom
NIS domain name: ipa.test
Member User: admin
-------------------------
Number of members added 1
-------------------------
$ ipa netgroup-mod --nisdomain="" emptydom
----------------------------
Modified netgroup "emptydom"
----------------------------
Netgroup name: emptydom
Member User: admin
Then run:
getent negroup emptydom
without the patch, the netgroup won't be resolvable. It will resolve to
a netgroup triple that looks like this after the patch:
emptydom (-,admin,)
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> |
60a715a0dd79873d2d2607eab8fdfaf0ffd2e7d3 |
|
09-Feb-2018 |
Hristo Venev <hristo@venev.name> |
providers: Move hostid from ipa to sdap, v2
In the ldap provider, all option names are renamed to ldap_host_*. In
the ipa provider the names haven't been changed.
Host lookups for both ipa and ldap are handled in the ldap provider.
sss_ssh_knownhostsproxy works but hostgroups are still only available
in the ipa provider.
I've also added some documentation for the ldap provider.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
ff565da1011aa4312847e28e7af66e57fccf8b90 |
|
14-Nov-2016 |
Michal Židek <mzidek@redhat.com> |
ipa: Nested netgroups do not work
We lowercase the keys to the hash table used to store netgroups
but do not lowercase it when reading the table. This results
in nested netgroups not being found when they should and
the processing fails.
The lowercasing does not seem to be necessary anymore (not
sure if it ever was) so we can skip it.
Resolves:
https://fedorahosted.org/sssd/ticket/3159
Reviewed-by: Petr Cech <pcech@redhat.com> |
92ec40e6aa25f75903ffdb166a8ec56b67bfd77d |
|
19-Jan-2016 |
Pavel Březina <pbrezina@redhat.com> |
SDAP: rename sdap_get_id_specific_filter
More generic name is used now since it is not used only for id
filters. Probably all references will be deleted when the code
uses sdap_search_in_bases istead of custom search base iterators.
Reviewed-by: Sumit Bose <sbose@redhat.com> |
e6595222c41af84288d303e8d464ce45b1408ed3 |
|
22-Sep-2015 |
Petr Cech <pcech@redhat.com> |
IPA PROVIDER: Resolve nested netgroup membership
Informations about usergroup membership are stored in memberOf
attribute. And informations about hostgroup membership are stored
in originalMemberOf.
This patch add appropriate memberOf attributes
for searching in.
Ticket: https://fedorahosted.org/sssd/ticket/2275
Reviewed-by: Sumit Bose <sbose@redhat.com> |
4dd38025efda88f123eac672f87d3cda12f050c8 |
|
02-May-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: Make it possible to extend an attribute map
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> |
c048657aa2fbb246b5dc199ef6101bfd6e5eeaea |
|
31-Mar-2014 |
Lukas Slebodnik <lslebodn@redhat.com> |
IPA: Use function sysdb_attrs_get_el in safe way
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> |
83bf46f4066e3d5e838a32357c201de9bd6ecdfd |
|
12-Feb-2014 |
Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> |
Update DEBUG* invocations to use new levels
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> |
a3c8390d19593b1e5277d95bfb4ab206d4785150 |
|
12-Feb-2014 |
Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> |
Make DEBUG macro invocations variadic
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> |
feffebb989dc5e24a707a7266cc467da23087241 |
|
27-Nov-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
Remove unused parameter from ipa_save_netgroup |
d115f40c7a3999e3cbe705a2ff9cf0fd493f80fb |
|
15-Nov-2013 |
Michal Zidek <mzidek@redhat.com> |
SYSDB: Drop the sysdb_ctx parameter - module sysdb_ops (part 2) |
0e65abe5cf2abf5d4b431cf6bd161b419f07901d |
|
11-Sep-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
Fix formating of variables with type: size_t |
749cfb5d3270b5daf389d51a0dbd3fd2aec6e05d |
|
07-Jun-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
LDAP: new SDAP domain structure
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. |
b7427d63bd328be32991f9d437c4a3d46bcabe03 |
|
15-Jan-2013 |
Simo Sorce <simo@redhat.com> |
Add domain arguments to sysdb_add_inetgroup fns. |
5e9bc89b28f1ac3ce573ecdece74fe9623580c28 |
|
12-Sep-2012 |
Pavel Březina <pbrezina@redhat.com> |
netgroup: resolve hostgroup membership correctly
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. |
64ddff90c7fcc02ccb06824ac93af7d5f361a88f |
|
31-May-2012 |
Jan Zeleny <jzeleny@redhat.com> |
Add support for filtering atributes
This patch adds support for filtering attributes when constructing
attribute list from a map for LDAP query. |
ca4b7b92738f3dd463914e3de5757cd98d37a983 |
|
10-May-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
LDAP: Add attr_count return value to build_attrs_from_map()
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. |
66b927a4f19f18f2ed07be416747817037b47909 |
|
02-May-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
IPA netgroups: return EOK when there are no netgroups to process
If the code fell through the loop, ret would have been random value. |
277a0187190fd417696590b303a5d7a204ed0555 |
|
24-Feb-2012 |
Jan Zeleny <jzeleny@redhat.com> |
Delete missing attributes from netgroups to be stored
https://fedorahosted.org/sssd/ticket/1136 |
fdab7bbf8933351f6254438c30ff361cd748b15a |
|
24-Feb-2012 |
Jan Zeleny <jzeleny@redhat.com> |
IPA hosts refactoring |
2f3ee3f49019f5b60adbe073070f31e6e2d7c7ab |
|
24-Feb-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
LDAP: Only use paging control on requests for multiple entries
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 |
3e1c814a7ca3a0e4086e0822d6b4df23b8465bc8 |
|
10-Feb-2012 |
Jan Zeleny <jzeleny@redhat.com> |
Fixed issue with netgroup update in IPA provider
This issue led to a netgroup with one triple (-,-,domain) when it
contained no triples on the IPA server. |
9674f0f018c65a9af6b18dd0a4e515f726803d27 |
|
06-Feb-2012 |
Jan Zeleny <jzeleny@redhat.com> |
Renamed some sysdb constants for their wider usage |
bd92e8ee315d4da9350b9ef0358c88a7b54aeebe |
|
04-Feb-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
NSS: Add individual timeouts for entry types
https://fedorahosted.org/sssd/ticket/1016 |
169fa5bd3edd34aa0db35681832bd7406e423c1b |
|
04-Feb-2012 |
Stephen Gallagher <sgallagh@redhat.com> |
LDAP: Do not fail if RootDSE check cannot determine search bases
https://fedorahosted.org/sssd/ticket/1152 |
029e6f1727972ffe31f97c7738a98d0efecb3e15 |
|
06-Jan-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
IPA netgroups: Do not reuse loop iterator variable |
57170bd05e64559a604c1907c59728e8d9e83cd4 |
|
12-Dec-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
Fix uninitialized value error in ipa_netgroups.c
DEBUG message can print an unitialized value if the first netgroup
has no members.
Coverity 12382 |
bb57f6003fa42856d0578ac27eb57e798be9bbb5 |
|
09-Dec-2011 |
Jan Zeleny <jzeleny@redhat.com> |
Fixed IPA netgroup processing
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. |
0368c4b1a1341889bb86a80887d4c91d224f339c |
|
28-Nov-2011 |
Jan Zeleny <jzeleny@redhat.com> |
Fixed logically dead code in netgroup processing |
92ebfa89209b57ba1d9a202543ec32486036f6f0 |
|
28-Nov-2011 |
Jan Zeleny <jzeleny@redhat.com> |
Fixed uninitialized pointer read in netgroups processing |
e526b608657f229f7486b3aa8c53b0f2c53b42b1 |
|
23-Nov-2011 |
Jan Zeleny <jzeleny@redhat.com> |
Added support for fetching netgroups in IPA provider |