summaryrefslogtreecommitdiffstats
path: root/src/db/sysdb_ssh.c
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2017-10-31 15:16:35 +0100
committerPavel Březina <pbrezina@redhat.com>2017-11-07 11:42:11 +0100
commit90c473f5d18403e046cd8de746fa43fd20f485e3 (patch)
treeaad90bdff1b59de3f494656e74303fe7bea25556 /src/db/sysdb_ssh.c
parent48b7cc6095065c337dcefb200de61da9e9f0d38f (diff)
downloadsssd-sudohost.tar.gz
sssd-sudohost.tar.xz
sssd-sudohost.zip
sysdb custom: completely replace old object instead of merging itsudohost
This patch is written primary for sudo use case, but it makes sure the we do not merge two record in other parts of the code that uses sysdb_store_custom. 1) If there are two rules with the same cn (possible with multiple search bases or organizational units) we would end up merging those two rules instead of choosing one of them. 2) Also smart refresh would merge the diff insteand of removing the attributes that are no longer present in ldap. Since 1) is a rare use case and it is a misconfiguration we completely replace the old rule with new one. It is simpler to implement and it solves both issues. Resolves: https://pagure.io/SSSD/sssd/issue/3558
Diffstat (limited to 'src/db/sysdb_ssh.c')
-rw-r--r--src/db/sysdb_ssh.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/db/sysdb_ssh.c b/src/db/sysdb_ssh.c
index 4983dcc34..f4a5a8e88 100644
--- a/src/db/sysdb_ssh.c
+++ b/src/db/sysdb_ssh.c
@@ -38,8 +38,7 @@ sysdb_update_ssh_host(struct sss_domain_info *domain,
{
errno_t ret;
- ret = sysdb_store_custom(domain, name, SSH_HOSTS_SUBDIR,
- attrs);
+ ret = sysdb_store_custom(domain, name, SSH_HOSTS_SUBDIR, attrs);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
"Error storing host %s [%d]: %s\n", name, ret, strerror(ret));