summaryrefslogtreecommitdiff
path: root/src/providers/ldap/sdap_async_accounts.c
AgeCommit message (Collapse)AuthorFilesLines
2011-04-01Only save members for successfully saved groupsJakub Hrozek1-2/+17
2011-03-30Fall back to cn if gecos is not availableStephen Gallagher1-0/+9
We were not fully compliant with section 5.3 of RFC 2307 which states: An account's GECOS field is preferably determined by a value of the gecos attribute. If no gecos attribute exists, the value of the cn attribute MUST be used. (The existence of the gecos attribute allows information embedded in the GECOS field, such as a user's telephone number, to be returned to the client without overloading the cn attribute. It also accommodates directories where the common name does not contain the user's full name.)
2011-03-28Mark transaction as done when cancelledJakub Hrozek1-2/+8
2011-03-28RFC2307: Ignore zero-length member names in group lookupsStephen Gallagher1-0/+4
2011-03-28Always complete the transaction in sdap_process_group_members_2307Stephen Gallagher1-0/+11
If the loop ran through at least one sdap_process_missing_member_2307() call and errored out later, we were not canceling the transaction.
2011-03-28Fix typo in sdap_nested_group_process_stepJakub Hrozek1-1/+1
2011-03-24Return from functions in LDAP provider after marking request as failedJakub Hrozek1-1/+4
2011-03-23Add sysdb_attrs_primary_name_list() routineStephen Gallagher1-18/+22
This routine will replace the use of sysdb_attrs_to_list() for any case where we're trying to get the name of the entry. It's a necessary precaution in case the name is multi-valued.
2011-03-23Use sysdb_attrs_primary_name() in sdap_initgr_nested_store_groupStephen Gallagher1-1/+3
2011-03-23Use fake groups during IPA schema initgroupsJakub Hrozek1-114/+418
https://fedorahosted.org/sssd/ticket/822
2011-03-23Add originalDN to fake groupsJakub Hrozek1-1/+10
2011-03-23RFC2307bis: Ignore aliases for groupsStephen Gallagher1-14/+26
Groups in ldap with multiple values for their groupname attribute will now be compared against the RDN of the entry to determine the "primary" group name. We will save only this primary group name to the ldb cache.
2011-03-23RFC2307: Ignore aliases for groupsStephen Gallagher1-23/+35
Groups in ldap with multiple values for their groupname attribute will now be compared against the RDN of the entry to determine the "primary" group name. We will save only this primary group name to the ldb cache.
2011-03-23Ignore aliases for usersStephen Gallagher1-20/+26
Users in ldap with multiple values for their username attribute will now be compared against the RDN of the entry to determine the "primary" username. We will save only this primary name to the ldb cache.
2011-03-22Sanitize DN when searching the original DN in the cacheSumit Bose1-1/+9
2011-03-17Fix incorrect return value checkStephen Gallagher1-1/+1
2011-03-15Fix LDAP search filter for nested initgroupsJakub Hrozek1-1/+1
2011-03-14Require existence of GID number and name in group searchesStephen Gallagher1-10/+20
https://fedorahosted.org/sssd/ticket/824
2011-02-21IPA provider: remove deleted groups during initgroups()Stephen Gallagher1-3/+112
The IPA provider was not properly removing groups in the cache that the user was no longer a member of. https://fedorahosted.org/sssd/ticket/803
2011-02-01Sanitize search filters for nested group lookupsStephen Gallagher1-3/+17
2011-01-21Delete attributes that are removed from LDAPStephen Gallagher1-8/+33
Sometimes, a value in LDAP will cease to exist (the classic example being shadowExpire). We need to make sure we purge that value from SSSD's sysdb as well. https://fedorahosted.org/sssd/ticket/750
2011-01-21Fix nested group handling during enumerationSumit Bose1-0/+14
Nested groups where not unrolled completely during the first enumeration run because not all where present in the cache.
2011-01-21Add missing include file to sdap_async_accounts.cStephen Gallagher1-0/+1
2011-01-21Add the user's primary group to the initgroups lookupStephen Gallagher1-6/+49
The user may not be a direct member of their primary group, but we still want to make sure that group is cached on the system.
2011-01-19Don't double-sanitize member DNsStephen Gallagher1-12/+4
After asking the cache for the list of member DNs for groups during an initgroups request, we were passing it through the sanitization function. Since this had already been done before they were saved to the cache, this meant that it was corrupting the results. It is safe to pass the returned DN directly into the sysdb_group_dn_name() function.
2011-01-17Add timeout parameter to sdap_get_generic_send()Sumit Bose1-14/+38
2011-01-14Add missing sysdb transaction to group enumerationsStephen Gallagher1-12/+45
We were not enclosing group processing in a transaction, which was resulting in extremely high numbers of disk-writes. This patch adds a transaction around the sdap_process_group code to ensure that these actions take place within a transaction. This patch also adds a check around the missing member code for RFC2307bis so we don't go back to the LDAP server to look up entries that don't exist (since the enumeration first pass would already have guaranteed that we have all real users cached)
2010-12-21Add all values of a multi-valued user attributeSumit Bose1-12/+15
2010-12-07ldap: Use USN entries if available.Simo Sorce1-54/+90
Otherwise fallback to the default modifyTimestamp indicator
2010-11-15Fix const cast warning for sysdb_update_membersStephen Gallagher1-6/+6
2010-11-15Sanitize search filters in LDAP providerStephen Gallagher1-3/+28
2010-11-15Sanitize sysdb dn for memberof lookupStephen Gallagher1-1/+11
2010-11-15Sanitize sysdb filters in the LDAP providerStephen Gallagher1-2/+11
2010-10-26Always use uint32_t for UID/GID numbersJakub Hrozek1-17/+12
2010-10-18set in_transaction explicitly to falseJakub Hrozek1-1/+1
2010-10-18Use unsigned long for conversion to id_tJakub Hrozek1-32/+14
We used strtol() on a number of places to convert into uid_t or gid_t from a string representation such as LDAP attribute, but on some platforms, unsigned long might be necessary to store big id_t values. This patch converts to using strtoul() instead.
2010-10-18Add proper nested initgroup support for RFC2307bis serversStephen Gallagher1-3/+761
2010-10-18Modify sysdb_[add|remove]_group_member to accept users and groupsStephen Gallagher1-0/+1
Previously, it assumed that all members were users. This changes the interface so that either a user or a group can be specified. Also, it eliminates the need for a memory context to be passed, since the internal memory should be self-contained.
2010-10-18Handle nested groups in RFC2307bisStephen Gallagher1-1/+776
This first approach handles the non-optimized "pure" RFC2307bis case. It recursively calls into nested groups until it it has found them all or hits the pre-defined nesting limit. It then saves all member users first, then all groups to the sysdb
2010-10-18Make sdap_save_users_send handle zero users gracefullyStephen Gallagher1-0/+5
If we send a zero num_users value, we should just immediately return success, rather than starting a useless transaction
2010-10-15Save dummy member users during RFC2307 getgr{nam,gid}Jakub Hrozek1-82/+279
2010-10-15Save dummy groups to cache during initgroupsJakub Hrozek1-0/+125
If during initgroups operation we find out that any of the groups the user is a member of is not cached yet we add a incomplete, expired group entry. That way, we save ourselves from looking up and saving all the potential user entries the group may also consist of. Because the group is expired, it will be refreshed during the next getgrgid/getgrnam call and correct member list will be returned.
2010-10-13Return all group members from getgr(nam|gid)Ralf Haferkamp1-12/+374
getgrnam()/getgrgid() should return all group members instead of only those which have already been cached (in sysdb). To achieve this every member that is currently not in the cache is looked up via LDAP and saved to the cache.
2010-10-13Shortcut for save_group() to accept sysdb DNs as member attributesRalf Haferkamp1-4/+19
Addtional parameter "populate_members" for save_group() and save_groups() to indicate that the "member" attribute of the groups is populated with sysdb DNs of the members (instead of LDAP DNs).
2010-09-22Request the correct attribute nameJakub Hrozek1-1/+1
2010-09-22Request all group attributes during initgroups processingStephen Gallagher1-5/+6
We tried to be too clever and only requested the name of the group, but we require the objectClass to validate the results. https://fedorahosted.org/sssd/ticket/622
2010-09-02Fixed printing of undefined value in sdap_async_accounts.cJan Zeleny1-1/+1
If sysdb_attrs_get_el() call failed in function sdap_save_group(), it would result in printing an undefined value of variable name. This is now fixed by initializing the variable. Ticket: #579
2010-08-03Clean up initgroups processing for RFC2307Stephen Gallagher1-11/+89
Instead of recursively updating all users of each group the user being queried belongs to, just add or remove membership for the requested user. Fixes https://fedorahosted.org/sssd/ticket/478
2010-06-16Standardize on correct spelling of "principal" for krb5Stephen Gallagher1-2/+2
https://fedorahosted.org/sssd/ticket/542
2010-06-10Properly handle missing originalMemberOf entry in initgroupsStephen Gallagher1-0/+1
Failing to return after the tevent_req_post() here can result in a null-pointer dereference (along with other hard-to-track bugs) https://fedorahosted.org/sssd/ticket/507