summaryrefslogtreecommitdiff
path: root/src/responder/nss
AgeCommit message (Collapse)AuthorFilesLines
2013-01-15Add domain argument to sysdb_initgroups()Simo Sorce1-2/+2
2013-01-15Add domain option to sysdb_get/netgr/attrs() fnsSimo Sorce1-1/+1
2013-01-15Pass domain to sysdb_enum<pw/gr>ebt() functionsSimo Sorce1-4/+4
2013-01-15Pass domain to sysdb_get<pwu/grg><id() functionsSimo Sorce1-2/+2
2013-01-15Pass domain to sysdb_get<pw/gr>nam() functionsSimo Sorce1-9/+5
Also allows us to remove sysdb_subdom_get<pw/gr>nam() wrappers and restore fqnames proper value in subdomains, by testing for a parent domain being present or not.
2013-01-07memcache: add macro that validates record lengthPavel Březina1-2/+1
2013-01-07sss_userdel and sss_groupdel with use_fully_qualified_namesMichal Zidek1-15/+50
If use_fully_qualified_names is used, we need to pass fqdn to sss_mmap_cache_*_invalidate.
2012-12-20mmap cache: invalidate cache on fatal errorSimo Sorce3-10/+30
If a fatal EFAULT error is returned by the internal function that frees used memory invalidate the whole cache and reinit it. This way we avoid further corruption and insure clients see consistent data. Also insure we use the right context in init() and we use talloc_zfree() in reinit so that if the init() later fails we do not leave around a pointer to free memory in the callers.
2012-12-20Carefully check records when forcibly invalidatingSimo Sorce1-18/+101
We should never try to invalidate an already invalid record as internal pointers will not be consistent. Carefully test that the record really is valid when we are fishing for free space, and properly invalidate records or return a fatal error if something goes wrong. In order to make the code more robust always invalidate the whole data space on initialization by setting all bits to 1, and make sure to invalidate the whole last allocated slot by converting rec->len to the number of slots instead of just the space used.
2012-12-20Update free table when records are invalidated.Simo Sorce1-14/+23
We were holding up slots when entries were invalidated directly an not through our primitive garbage collection scheme.
2012-12-20nss_mc: Add extra checks when dereferencing recordsSimo Sorce1-0/+12
Although it should enver happen that we pass in an invalid hash it is always better to just not do anything than access memory ouf of the hash table. It can lead to segfaults, or worse referencing memory that should not be touched.
2012-12-19sssd_nss: Plug memory leaksSimo Sorce1-2/+11
A recent patch introduced a glaring memory leak in the routines that clean up memcache memory on initgroups calls.
2012-12-18RESPONDERS: Create a common file with service names and versionsJakub Hrozek2-3/+1
The monitor sends calls different sbus methods to different responders. Instead of including headers of the particular responders directly in monitor, which breaks layering a little, create a common header file that will be included from src/responder/common/
2012-12-14Allow mmap calls to gracefully return absent ctxSimo Sorce1-0/+25
This is to allow to freely call mc functions even if initialization failed. They will now gracefully fail instead of segfaulting.
2012-12-13sssd_nss: Remove entries from memory cache if not found in sysdbMichal Zidek1-0/+23
Functions nss_cmd_getXXnam remove entries from memory cache if not found in sysdb cache of a local domain.
2012-12-11NSS: Fix the error handler in sss_mc_create_fileJakub Hrozek1-10/+16
https://fedorahosted.org/sssd/ticket/1704 The function is short enough so that we can simply stick with return and release resources before returning as appropriate.
2012-12-05Hook for mmap cache update on initgroup callsSimo Sorce3-0/+147
This set of functions enumerate the user's groups and invalidate them all if the list does not matches what we get from the caller.
2012-12-05Hook to perform a mmap cache update from sssd_nssSimo Sorce3-0/+118
This set of functions enumerate each user/group from all domains and invalidate any mmap cache record that matches.
2012-12-05mmap cache: public functions to invalidate recordsSimo Sorce2-0/+135
These functions can be called from the nss responder to invalidate records that have ceased to exist or that need to be refreshed the first time an application needs them.
2012-12-04NSS: Fix netgroup midpoint cache refreshJakub Hrozek2-2/+2
https://fedorahosted.org/sssd/ticket/1683 The result of the percent calculation was always 0 as it used plain ints. The patch switches to using explicit floats to avoid reintroducing the bug again even with brackets.
2012-11-19Refactor the way subdomain accounts are savedSimo Sorce1-3/+7
The original sysdb code had a strong assumption that only users from one domain are saved in the databse, with the subdomain feature, we have changed reality, but have not adjusted all the code arund the sysdb calls to not rely on the original assumption. One of the side effects of this incongrunece is that currently group memberships do not return fully qualified names for subdomain users as they should. In oreder to fix this and other potential issues surrounding the violation of the original assumption, we need to fully qualify subdomain user names. By savin them fully qualified we do not risk aliasing local users and have group memberhips or other name based matching code mistake a domain user with subdomain usr or vice versa.
2012-11-15Add ignore_group_members option.Paul B. Henson1-16/+19
https://fedorahosted.org/sssd/ticket/1376
2012-11-10Add helpers to set common mc record fieldsSimo Sorce1-16/+26
Les copy/paste and chance of errors when setting basic record fields that are shared among all object types.
2012-11-06sss_cache: Remove fastcache even if sssd is not running.Michal Zidek1-3/+23
https://fedorahosted.org/sssd/ticket/1584
2012-10-29Include talloc log in our debug facilityMichal Zidek1-1/+1
https://fedorahosted.org/sssd/ticket/1495
2012-10-23Fix two errors in the nss responderSumit Bose1-1/+3
One is a copy-and-paste error which was introduce by 1774ee9a61b9d691dadd1a0538f32bcdcc84f72f. The second fixes a missing explicit setting of the return value. In the case where we want fully qualified names ret contains the number of characters from the last snprintf() which is almost ever not 0.
2012-10-18Allow setting the default_shell option per-domain as wellJakub Hrozek1-1/+3
https://fedorahosted.org/sssd/ticket/1583
2012-10-12Check for subdomains if getpwuid or getgrgid are the first requestsSumit Bose1-0/+72
Fixes https://fedorahosted.org/sssd/ticket/1561
2012-10-11nss_cmd_retpwent(): do not go into infinite loop if n < 0Pavel Březina1-0/+8
https://fedorahosted.org/sssd/ticket/1551
2012-10-09Fix typosYuri Chornoivan1-1/+1
2012-10-02Fix few coding style issuesPavel Březina1-1/+1
2012-10-01Add new option default_domain_suffixSumit Bose3-8/+18
2012-09-24sss_cache tool invalidates records in memory cache.Michal Zidek3-2/+126
2012-09-13NSS: Fix off-by-one error in parse_getservbynameJakub Hrozek1-1/+1
https://fedorahosted.org/sssd/ticket/1438
2012-07-20NSS: Add override_shell optionStephen Gallagher3-2/+18
If override_shell is specified in the [nss] section, all users managed by SSSD will have their shell set to this value. If it is specified in the [domain/DOMAINNAME] section, it will apply to only that domain (and override the [nss] value, if any). https://fedorahosted.org/sssd/ticket/1087
2012-07-18Fix uninitialized valuesNick Guay1-3/+3
https://fedorahosted.org/sssd/ticket/1379
2012-07-12Add newline to DEBUG messagesJakub Hrozek1-2/+2
2012-06-21Fix re_expression matching with subdomainsJan Zeleny2-37/+99
This patch fixes an issue which resulted in a need to initialize responder with data from local domain, otherwise it would not correctly detect requests for subdomains. Similar situation can occur if new subdomain is added at runtime. The solution is to ask for a list of subdomains in case there is a candidate domain identified in the process of matching re_expressions with given name.
2012-06-20Move some debug lines to new debug log levelsStef Walter1-1/+1
* These are common lines of debug output when starting up sssd https://bugzilla.redhat.com/show_bug.cgi?id=811113
2012-06-12Make re_expression and full_name_format per domain optionsStef Walter4-20/+21
* Allows different user/domain qualified names for different domains. For example Domain\User or user@domain. * The global re_expression and full_name_format options remain as defaults for the domains. * Subdomains get the re_expression and full_name_format of their parent domain. https://bugzilla.redhat.com/show_bug.cgi?id=811663
2012-06-10Allow fast memcache timeout to be configurableJan Zeleny3-5/+15
https://fedorahosted.org/sssd/ticket/1318
2012-05-31Ghost members - various small changesJan Zeleny1-1/+1
2012-05-31Ghost members - NSS responder changesJan Zeleny1-89/+147
Since there are two attributes storing information about user memberships of the group we have to include both of them in results. This will apply only for objects that have ghost members (i.e. they contain the SYSDB_GHOST attribute). If an object has this attribute, values of this attribute are not projected to the memberuid attribute.
2012-05-25NSS: Restore original protocol for getservbyportStephen Gallagher1-1/+1
When fixing an endianness bug, we changed the protocol unnecessarily.
2012-05-25Send 16bit protocol numbers from the sss_clientJakub Hrozek1-1/+1
https://fedorahosted.org/sssd/ticket/1348
2012-05-24NSS: Fix segfault when mmap cache cannot be initializedStephen Gallagher1-2/+2
2012-05-16NSS: Expire in-memory netgroup cache before the nowait timeoutStephen Gallagher1-1/+9
The fact that we were keeping it in memory for the full duration of the cache timeout meant that we would never reap the benefits of the midpoint cache refresh. https://fedorahosted.org/sssd/ticket/1340
2012-05-15Use sized_string correctly in FQDN domainsJakub Hrozek1-2/+2
2012-05-15NSS: keep a pointer to body after body is reallocatedJakub Hrozek1-0/+3
2012-05-10Send the correct enumeration requestJakub Hrozek1-1/+1
https://fedorahosted.org/sssd/ticket/1329