summaryrefslogtreecommitdiffstats
path: root/src/db
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-04-29 14:37:27 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-04-29 20:44:19 +0200
commit3896c82a127ec0858429e04b8019773dbf7e7b92 (patch)
treeb42a432b0a9a3692edfe6e4bdbbd02961130932e /src/db
parent916ed98c63c4c2256737f853ceb746f284028bc5 (diff)
downloadsssd-3896c82a127ec0858429e04b8019773dbf7e7b92.tar.gz
sssd-3896c82a127ec0858429e04b8019773dbf7e7b92.tar.xz
sssd-3896c82a127ec0858429e04b8019773dbf7e7b92.zip
Only try to relink ghost users if we're not enumerating
https://fedorahosted.org/sssd/ticket/1893 When SSSD is not enumerating (which is the default), we are trying to link any "ghost" entries with a newly created user entry. However, when enumeration is on, this means a spurious search on adding any user.
Diffstat (limited to 'src/db')
-rw-r--r--src/db/sysdb_ops.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 5d0748740..cd55afdcb 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -1071,6 +1071,15 @@ int sysdb_add_user(struct sysdb_ctx *sysdb,
goto done;
}
+ /* If we're not enumerating, previous getgr{nam,gid} calls might
+ * have stored ghost users into the cache, so we need to link them
+ * with the newly-created user entry
+ */
+ if (domain->enumerate == true) {
+ ret = EOK;
+ goto done;
+ }
+
/* We need to find all groups that contain this object as a ghost user
* and replace the ghost user by actual member record in direct parents.
* Note that this object can be referred to either by its name or any