summaryrefslogtreecommitdiffstats
path: root/src/db
Commit message (Collapse)AuthorAgeFilesLines
* Null pointer dereferenced.Michal Zidek2012-11-281-96/+100
| | | | https://fedorahosted.org/sssd/ticket/1674
* Uninitialized pointer readMichal Zidek2012-11-281-1/+1
| | | | https://fedorahosted.org/sssd/ticket/1673
* SYSDB: Don't operate with aliases same as nameOndrej Kos2012-11-271-0/+6
| | | | | | | fixes https://fedorahosted.org/sssd/ticket/1628 When user's alias is same as it's name, don't use it for searching in sysdb, and for deleting.
* LDAP: Only convert direct parents' ghost attribute to memberJakub Hrozek2012-11-213-9/+41
| | | | | | | | | | | | | | | | | https://fedorahosted.org/sssd/ticket/1612 This patch changes the handling of ghost attributes when saving the actual user entry. Instead of always linking all groups that contained the ghost attribute with the new user entry, the original member attributes are now saved in the group object and the user entry is only linked with its direct parents. As the member attribute is compared against the originalDN of the user, if either the originalDN or the originalMember attributes are missing, the user object is linked with all the groups as a fallback. The original member attributes are only saved if the LDAP schema supports nesting.
* SYSDB: Use the add_string convenience functions for managing ghost user ↵Jakub Hrozek2012-11-211-24/+9
| | | | | | | attribute Using the convenience function instead of low-level ldb calls makes the code more compact and more readable.
* Handle conversion to fully qualified usernamesSimo Sorce2012-11-193-1/+98
| | | | | | | In subdomains we have to use fully qualified usernames. Unfortunately we have no other good option than simply removing caches for users of subdomains. This is because the memberof plugin does not support the rename operation.
* Refactor the way subdomain accounts are savedSimo Sorce2012-11-193-1/+52
| | | | | | | | | | | | | | | | | 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.
* Simplify writing db update functionsSimo Sorce2012-11-191-421/+192
| | | | | | Add functions to automate setting versions numbers in the db, also decrease chances of error in copying and pasting code, by setting the version number only once when we commence the upgrade.
* Display more information on DB version crashOndrej Kos2012-11-192-2/+64
| | | | | | | | | | | | | https://fedorahosted.org/sssd/ticket/1589 Added check for determining, whether database version is higher or lower than expected. To distinguish it from other errors it uses following retun values (further used for appropriate error message): EMEDIUMTYPE for lower version than expected EUCLEAN for higher version than expected When SSSD or one of it's tools fails on DB version mismatch, new error message is showed suggesting how to proceed.
* SYSDB: Do not touch the member attribute during conversion to ghost usersJakub Hrozek2012-11-151-11/+0
| | | | | | | | | We attempted to delete the member attributes of groups that contained a particular user during the sysdb upgrade, but obviously, this cannot work for nested groups as the member attribute is present for direct parents only. As a result, we were getting failures during the upgrade. https://fedorahosted.org/sssd/ticket/1631
* Add pac_user_get_grp_info() to read current group membershipsSumit Bose2012-11-121-0/+1
| | | | | | | | | | | | To be able to efficiently store group memberships we need to know the current memberships of a user. sysdb_initgroups() is used to read the user entry together with all groups the user is a member of. Some of the group attributes are kept to avoid additional lookups and speed up further processing. Currently sysdb_initgroups() does not return the original DN of the group. Since it is needed to remove memberships later on it is added to the list of requested attributes
* sysdb: add sysdb_base_dn()Sumit Bose2012-11-052-0/+5
| | | | | Add a help function which returns the ldb_dn object for the base dn of the cache.
* sysdb: look for ranges in the parent treeSumit Bose2012-11-051-1/+4
| | | | | | Make sure the right sub-tree in the cache is used to search for ranges. Sub-domain trees do not have range objects only the tree of the parent domain.
* SSH: When host keys are removed from LDAP, remove them from the cache as wellJan Cholasta2012-10-121-36/+34
| | | | https://fedorahosted.org/sssd/ticket/1574
* SSH: Expire hosts in known_hostsJan Cholasta2012-10-055-3/+179
|
* SSH: Refactor sysdb and related codeJan Cholasta2012-10-052-85/+182
|
* sysdb_master_domain_get_info: fix copy-and-paste errorSumit Bose2012-10-011-2/+2
|
* DB: Use TALLOC_CTX for talloc contextJakub Hrozek2012-09-241-10/+10
| | | | A couple of sysdb functions used "void *" in place of a TALLOC_CTX.
* SYSDB: Remove unnecessary domain parameter from several sysdb callsJakub Hrozek2012-09-245-76/+58
| | | | | The domain can be read from the sysdb object. Removing the domain string makes the API more self-contained.
* AUTOFS: convert the existing autofs entries during a sysdb upgradeJakub Hrozek2012-09-243-1/+144
|
* AUTOFS: Use both key and value in entry RDNJakub Hrozek2012-09-242-11/+40
| | | | | | This patch switches from using just key in the RDN to using both key and value. That is neccessary to allow multiple direct mounts in a single map.
* AUTOFS: Add entry objects below map objectsJakub Hrozek2012-09-244-146/+64
| | | | | | | | https://fedorahosted.org/sssd/ticket/1506 Changes how the new autofs entry objects are handled. Instead of creating the entry on the cn=autofs,cn=custom level, the entry is created below the map it belongs to.
* DB: Cancel transaction in sysdb_store_user if sysdb_add_user failsJakub Hrozek2012-09-201-1/+8
|
* LDB_ERR_INVALID_ATTRIBUTE_SYNTAX added to sysdb_error_to_errno.Michal Zidek2012-09-201-0/+2
|
* SELinux: Always use the default if it exists on the serverJakub Hrozek2012-09-131-2/+9
| | | | | | | | | | | | | | https://fedorahosted.org/sssd/ticket/1513 This is a counterpart of the FreeIPA ticket https://fedorahosted.org/freeipa/ticket/3045 During an e-mail discussion, it was decided that * if the default is set in the IPA config object, the SSSD would use that default no matter what * if the default is not set (aka empty or missing), the SSSD would just use the system default and skip creating the login file altogether
* DB: Always write the SELinux object to sysdbJakub Hrozek2012-09-131-70/+8
| | | | | | There's no point in checking if the object already exists because we always wipe the whole sysdb subtree. We were also immediatelly cancelling the transaction because we'd jump to goto, even though it was with EOK.
* SYSDB: NULL-terminate the output of sysdb_get_{ranges,subdomains}Jakub Hrozek2012-09-102-2/+5
|
* SYSDB: Commit transaction in sysdb_store_userJakub Hrozek2012-09-051-17/+19
|
* Unify usage of sysdb transactions (part 2).Michal Zidek2012-09-049-270/+330
|
* SYSDB: Make sysdb_attrs_get_el_int() publicStephen Gallagher2012-08-212-8/+10
| | | | Also rename it to sysdb_attrs_get_el_ext()
* Only create the SELinux login file if there are mappings on the serverJakub Hrozek2012-08-161-6/+1
| | | | | | | | | | | https://fedorahosted.org/sssd/ticket/1455 In case there are no rules on the IPA server, we must simply avoid generating the login file. That would make us fall back to the system-wide default defined in /etc/selinux/targeted/seusers. The IPA default must be only used if there *are* rules on the server, but none matches.
* Remove SYSDB_SUDO_CACHE_OC from attribute listsPavel Březina2012-08-071-1/+0
| | | | It is not an attribute.
* Rename SYSDB_SUDO_CACHE_AT_OC to SYSDB_SUDO_CACHE_OCPavel Březina2012-08-072-4/+4
| | | | | It does not contain name of the object class attribute but the value itself. I renamed it to avoid confusion.
* Remove redefinition of some SYSDB_* macrosPavel Březina2012-08-071-10/+0
|
* SYSDB: Use ldb_msg_add_string for simple string additionsJakub Hrozek2012-08-063-12/+12
|
* SYSDB: Check the return valueJakub Hrozek2012-08-061-0/+1
|
* Change refreshing of subdomainsSimo Sorce2012-08-012-7/+9
| | | | | | | | | This patch keeps a local copy of the subdomains in the ipa subdomains plugin context. This has 2 advantages: 1. allows to check if anything changed w/o always hitting the sysdb. 2. later will allows us to dump this information w/o having to retrieve it again. The timestamp also allows to avoid refreshing too often.
* Add realm paramter to subdomain listSimo Sorce2012-08-012-3/+63
| | | | This will be used later for setting domain_realm mappings in krb5.conf
* Fix return error and debug messageSimo Sorce2012-08-011-2/+7
| | | | | | The debuf message was trying to print the number of returned entries, but no integer was provided. Return ENOENT as the error for when there are no entries, not EINVAL.
* Use ldb_msg_add_string with bare stringsSimo Sorce2012-08-011-9/+7
|
* Fix wrong elements used in comparisonSimo Sorce2012-08-011-2/+2
|
* Fix double semi-colonsSimo Sorce2012-08-011-5/+5
|
* 80 columns policeSimo Sorce2012-08-011-8/+13
|
* Change subdomain_infoSimo Sorce2012-08-012-17/+17
| | | | | Rename the structure to use a standard name prefix so it is properly name-spaced, in preparation for changing the structure itself.
* SYSDB: Add log message for unexpected LDB errorsStephen Gallagher2012-07-201-0/+3
|
* Fix sysdb_search_selinux_usermap_by_username return valueJakub Hrozek2012-07-201-0/+1
| | | | | | | | There was a logic bug in sysdb_search_selinux_usermap_by_username that resulted in returning the value the variable "ret" had after the last call to sysdb_attrs_get_uint32_t, which in cases the last rule processed did not have the requested attributes led to using the default user context.
* Fix uninitialized valuesNick Guay2012-07-182-3/+3
| | | | https://fedorahosted.org/sssd/ticket/1379
* SYSDB: Delete SELinux mappingsJakub Hrozek2012-07-182-0/+19
|
* Modify priority evaluation in SELinux user mapsJan Zeleny2012-07-182-1/+34
| | | | | | | | | | | | | | | | | | | The functionality now is following: When rule is being matched, its priority is determined as a combination of user and host specificity (host taking preference). After the rule is matched in provider, only its host priority is stored in sysdb for later usage. When rules are matched in the responder, their user priority is determined. After that their host priority is retrieved directly from sysdb and sum of both priorities is user to determine whether to use that rule or not. If more rules have the same priority, the order given in IPA config is used. https://fedorahosted.org/sssd/ticket/1360 https://fedorahosted.org/sssd/ticket/1395
* Add function sysdb_attrs_copy_values()Jan Zeleny2012-07-182-0/+27
| | | | | This function copies all values from one sysdb_attrs structure to another