diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2013-04-29 14:37:27 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-04-29 20:44:19 +0200 |
commit | 3896c82a127ec0858429e04b8019773dbf7e7b92 (patch) | |
tree | b42a432b0a9a3692edfe6e4bdbbd02961130932e /src/db | |
parent | 916ed98c63c4c2256737f853ceb746f284028bc5 (diff) | |
download | sssd-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.c | 9 |
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 |