summaryrefslogtreecommitdiff
path: root/src/db/sysdb_ops.c
AgeCommit message (Collapse)AuthorFilesLines
2013-01-07SYSDB: split sysdb_add_userOndrej Kos1-125/+176
The function itself was very long (more than 300 lines) and hard to read, this patch splits it to three logical blocks.
2013-01-07SYSDB: Modify ghosts in permissive modeOndrej Kos1-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.
2012-12-10SYSDB: Move misplaced assignmentJakub Hrozek1-2/+1
2012-11-23SYSDB: Don't operate with aliases same as nameOndrej Kos1-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.
2012-11-20LDAP: Only convert direct parents' ghost attribute to memberJakub Hrozek1-8/+37
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.
2012-11-20SYSDB: Use the add_string convenience functions for managing ghost user ↵Jakub Hrozek1-24/+9
attribute Using the convenience function instead of low-level ldb calls makes the code more compact and more readable.
2012-09-24SYSDB: Remove unnecessary domain parameter from several sysdb callsJakub Hrozek1-45/+33
The domain can be read from the sysdb object. Removing the domain string makes the API more self-contained.
2012-09-24AUTOFS: Add entry objects below map objectsJakub Hrozek1-19/+0
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.
2012-09-20DB: Cancel transaction in sysdb_store_user if sysdb_add_user failsJakub Hrozek1-1/+8
2012-09-05SYSDB: Commit transaction in sysdb_store_userJakub Hrozek1-17/+19
2012-09-04Unify usage of sysdb transactions (part 2).Michal Zidek1-28/+46
2012-08-06SYSDB: Use ldb_msg_add_string for simple string additionsJakub Hrozek1-6/+6
2012-08-06SYSDB: Check the return valueJakub Hrozek1-0/+1
2012-07-10Cast uid_t to unsigned long long in DEBUG messagesJakub Hrozek1-2/+2
2012-06-12SYSDB: Reduce noise level of debug messages in lookupsStephen Gallagher1-6/+8
2012-05-31Ghost members - modifications in sysdbJan Zeleny1-75/+153
Deleted sysdb_add_fake_user(): This function is no longer used. Modified sysdb_add_user(): When user object is added to sysdb, it is important to iterate over all groups that might have its name or any of its aliases as ghost member and replace this ghost membership by a real one. This will eliminate duplicite memberships.
2012-05-11SYSDB: Handle user and group renames betterJakub Hrozek1-7/+39
Fixes a regression in the local domain tools where sss_groupadd no longer detected a GID duplicate. The check for EEXIST is moved one level up into more high level function. The patch also adds the same rename support for users. I found it odd that we allowed a rename of groups but not users. There is a catch when storing a user -- his cached password would be gone. I think that renaming a user is such a rare operation that it's not severe, plus there is a warning in the logs.
2012-05-10SYSDB: Add better error logging to sysdb_set_entry_attr()Stephen Gallagher1-2/+8
2012-05-07Fix typo in debug messagePavel Březina1-1/+1
2012-02-24Delete missing attributes from netgroups to be storedJan Zeleny1-0/+14
https://fedorahosted.org/sssd/ticket/1136
2012-02-21Don't give memory context in confdb where not neededJan Zeleny1-3/+3
2012-02-05AUTOFS: sysdb interfaceJakub Hrozek1-6/+32
2012-02-05SYSDB: Remove code duplication between member_add and member_delJakub Hrozek1-39/+14
2012-01-31SYSDB: extend sysdb_store_service() to accept additional attributesStephen Gallagher1-12/+14
2012-01-23SYSDB: Move add_string and add_ulong to sysdb_private.hStephen Gallagher1-4/+4
2011-11-22SYSDB: Make ENOENT log messages less threateningStephen Gallagher1-16/+54
Previously, they were reported with the prefix "Error:" which caused confusion among end-users while debugging.
2011-11-02Handle group renaming correctlyJan Zeleny1-2/+7
https://fedorahosted.org/sssd/ticket/1040
2011-10-31Plug memory leaks in sysdb_opsJakub Hrozek1-20/+54
https://fedorahosted.org/sssd/ticket/1051
2011-10-13SysDB commands that save lastUpdate allows this value to be passed inPavel Březina1-25/+41
https://fedorahosted.org/sssd/ticket/836
2011-10-03Use explicit base 10 for converting strings to integersJakub Hrozek1-1/+1
https://fedorahosted.org/sssd/ticket/1013
2011-09-28Multiline macro cleanupJakub Hrozek1-1/+1
This is mostly a cosmetic patch. The purpose of wrapping a multi-line macro in a do { } while(0) is to make the macro usable as a regular statement, not a compound statement. When the while(0) is terminated with a semicolon, the do { } while(0); block becomes a compound statement again.
2011-08-15sysdb refactoring: memory context deletedJan Zeleny1-247/+254
This patch deletes memory context parameter in those places in sysdb where it is not necessary. The code using modified functions has been updated. Tests updated as well.
2011-08-15sysdb refactoring: deleted domain variables in sysdb APIJan Zeleny1-142/+75
The patch also updates code using modified functions. Tests have also been adjusted.
2011-08-15sysdb refactoring: renamed ctx variable to sysdbJan Zeleny1-131/+131
2011-06-02Non-posix group processing - sysdb changesJan Zeleny1-17/+23
2011-05-20Change sysdb_add_fake_user to add OriginalDNJakub Hrozek1-1/+8
RFC2307bis code relies heavily on originalDN, so the fake users need to have an option to store it, too.
2011-05-04Some minor fixes and changes in sysdb_opsJan Zeleny1-17/+40
2011-05-04Add a function for searching netgroups with custom filterJan Zeleny1-0/+57
2011-03-23Add originalDN to fake groupsJakub Hrozek1-1/+7
2011-02-28Do not try to delete sysbd memberOf attributeSumit Bose1-0/+4
2011-01-21Delete attributes that are removed from LDAPStephen Gallagher1-0/+118
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-14Do not throw a DP error when a netgroup is not foundStephen Gallagher1-1/+4
https://fedorahosted.org/sssd/ticket/775
2011-01-14Work around libldb bugStephen Gallagher1-2/+10
Libldb performs non-indexed searches for ONELEVEL requests. We'll use SUBTREE instead to reduce the performance hit substantially
2010-11-15Fix const cast warning for sysdb_update_membersStephen Gallagher1-2/+2
2010-10-18Modify sysdb_[add|remove]_group_member to accept users and groupsStephen Gallagher1-32/+77
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-15sysdb interface for adding fake usersJakub Hrozek1-0/+61
2010-10-15sysdb interface for adding incomplete groupsJakub Hrozek1-0/+44
Useful for optimizing the initgroups operation.
2010-10-13Do not fail if netgroup exists just update the attributesSumit Bose1-1/+1
2010-10-13Netgroups sysdb APIStephen Gallagher1-1/+352
2010-09-22Fix missing variable substitution in DEBUG messageStephen Gallagher1-2/+2