summaryrefslogtreecommitdiffstats
path: root/src/db
Commit message (Collapse)AuthorAgeFilesLines
...
* Add domain argument to sysdb_get_user_attr()Simo Sorce2013-01-152-1/+3
|
* Add domain argument to sysdb_initgroups()Simo Sorce2013-01-152-1/+3
|
* Add domain option to sysdb_get/netgr/attrs() fnsSimo Sorce2013-01-152-3/+7
|
* Pass domain to sysdb_enum<pw/gr>ebt() functionsSimo Sorce2013-01-152-3/+7
|
* Pass domain to sysdb_get<pwu/grg><id() functionsSimo Sorce2013-01-152-3/+7
|
* Pass domain to sysdb_get<pw/gr>nam() functionsSimo Sorce2013-01-154-58/+41
| | | | | | 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.
* Upgrade DB and move ranges into top level objectSimo Sorce2013-01-153-1/+124
|
* Move range objects into their own top-level tree.Simo Sorce2013-01-152-10/+6
| | | | | | | | | | | Storing ranges for multiple domains under any specific domain is somewhat aritrary and unnecessary. Put ranges under cn=ranges,cn=sysdb, without involving any specific domain subtree. This allows us to avoid using sysdb->domain in ranges functions. Also storing other subdomains data under the parent domain tree felt wrong, all other domain specific data is under their own subtree. Moving this data in its own place seems a better solution.
* Make sysdb_custom_subtree_dn() require a domain.Simo Sorce2013-01-155-8/+13
|
* Make sysdb_custom_dn() require a domain.Simo Sorce2013-01-154-5/+11
|
* Make sysdb_domain_dn() require a domain.Simo Sorce2013-01-153-4/+7
|
* Make sysdb_netgroup_base_dn() require a domain.Simo Sorce2013-01-152-4/+8
|
* Make sysdb_netgroup_dn() require a domain explictly.Simo Sorce2013-01-153-7/+7
|
* Make sysdb_group_dn() require a domain explictly.Simo Sorce2013-01-153-9/+9
|
* Make sysdb_user_dn() require a domain explictly.Simo Sorce2013-01-153-9/+9
|
* Remove the sysdb_ctx_get_domain() function.Simo Sorce2013-01-153-8/+1
| | | | | We are deprecating sysdb->domain so kill the function that gives access to this member as we should stop relying on it being available (or correct).
* Refactor single domain initializationSimo Sorce2013-01-152-38/+0
| | | | | Bring it out of sysdb, which will slowly remove internal dependencies on domains and instead will always require them to be passed by callers.
* Refactor sysdb initializationSimo Sorce2013-01-152-145/+13
| | | | | | | | | | | | Change the way sysdbs are initialized. Make callers responsible for providing the list of domains. Remove the returned array of sysdb contexts, it was used only by sss_cache and not really necessary there either as that tool can easily iterate the domains. Make sysdb ctx children of their respective domains. Neither sysdb context nor domains are ever freed until a program is done so there shouldn't be any memory hierarchy issue. As plus we simplify the code by removing a destructor and a setter function.
* The Big sysdb/domain split-up!Simo Sorce2013-01-151-1/+1
| | | | | | | This commit is the first of a complex work of untangling domain and sysdb. It turns out the idea of keeping a reference to the domain within the sysdb was a poor one so we need to split the domain out and change all functions that needs one to get it explicitly from their callers.
* Change pam data auth tokens.Simo Sorce2013-01-101-1/+0
| | | | Use the new authtok abstraction and interfaces throught the code.
* Code can only check for cached passwordsSimo Sorce2013-01-102-13/+2
| | | | | Make it clear to the API users that we can not take arbitrary auth tokens. We can only take a password for now so simplify and clarify the interface.
* Use sysdb_search_service() for all svc queriesSimo Sorce2013-01-102-78/+56
|
* Add sysdb_search_service() helper functionSimo Sorce2013-01-102-0/+63
|
* Remove dead netgroup functionsSimo Sorce2013-01-082-155/+0
|
* SYSDB: Split a function to read all SELinux mapsJakub Hrozek2013-01-082-23/+49
|
* SYSDB: Remove duplicate selinux definesJakub Hrozek2013-01-082-5/+1
|
* Translate LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS to EEXISTSumit Bose2013-01-081-0/+1
| | | | | | | | Currently only the LDB error code indicating that an entry already exists is translated to EEXIST. To make debugging easier and return a better indication of the reason for an error in the logs this patch translates the LDB error code for an already existing attribute or value to EEXIST as well.
* SYSDB: split sysdb_add_userOndrej Kos2013-01-071-125/+176
| | | | | The function itself was very long (more than 300 lines) and hard to read, this patch splits it to three logical blocks.
* SYSDB: Modify ghosts in permissive modeOndrej Kos2013-01-071-1/+33
| | | | | | | | | https://fedorahosted.org/sssd/ticket/1714 The attempt to delete all ghosts for users name and aliases was failing, resulting into failure of whole user-add operation. In permissive mode, the attempts to delete non-existent entries are not interpreted as error.
* Remove redundant definition.Simo Sorce2013-01-072-2/+1
| | | | | We had 2 defines for the same class. Consolidate and remove confusion.
* Fix a 'shadows a global declaration' warningSumit Bose2012-12-191-2/+2
|
* SYSDB: Add API to invalidate all map objectsJakub Hrozek2012-12-182-0/+94
| | | | This sysdb API will be used later to invalidate the autofs maps
* SYSDB: fix copy-n-paste errorJakub Hrozek2012-12-181-1/+1
|
* sudo: support generalized time formatPavel Březina2012-12-132-13/+34
| | | | | | | https://fedorahosted.org/sssd/ticket/1712 The timestamp doesn't have to be in the form yyyymmddHHMMSSZ any more. It can be in any form of generalized time format.
* sudo: include primary group in user group listPavel Březina2012-12-131-1/+41
| | | | https://fedorahosted.org/sssd/ticket/1677
* sysdb_get_sudo_user_info() initialize attrs on declarationPavel Březina2012-12-131-4/+3
|
* SYSDB: More debugging during the conversion to ghost usersJakub Hrozek2012-12-121-0/+9
| | | | | | | We've been hitting situations where the sysdb conversion failed. Unfortunately, the current code doesn't include enough debugging info to pinpoint the failing entries. This patch adds more DEBUG statements for each processed entry.
* SYSDB: Move misplaced assignmentJakub Hrozek2012-12-101-2/+1
|
* 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-231-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-203-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-201-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 mismatchOndrej 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: Remove unused macrosJakub Hrozek2012-11-191-15/+0
|
* SYSDB: Do not touch the member attribute during conversion to ghost usersJakub Hrozek2012-11-131-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-101-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