diff options
author | Jan Cholasta <jcholast@redhat.com> | 2012-09-18 05:01:48 -0400 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2012-09-20 10:17:57 +0200 |
commit | bd5790f9b213013a16e40a6fe79cbd11ddf567e4 (patch) | |
tree | d021723da3d5ad252eaa051327b2647afaddea46 | |
parent | b4262f1ac9c76d51e2c61ee3ce81e7d84fc1b9c6 (diff) | |
download | sssd-bd5790f9b213013a16e40a6fe79cbd11ddf567e4.tar.gz sssd-bd5790f9b213013a16e40a6fe79cbd11ddf567e4.tar.xz sssd-bd5790f9b213013a16e40a6fe79cbd11ddf567e4.zip |
SSH: Fix possible infinite loop when updating known_hosts
-rw-r--r-- | src/responder/ssh/sshsrv_cmd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/responder/ssh/sshsrv_cmd.c b/src/responder/ssh/sshsrv_cmd.c index 2497eb498..82a1f9016 100644 --- a/src/responder/ssh/sshsrv_cmd.c +++ b/src/responder/ssh/sshsrv_cmd.c @@ -592,7 +592,7 @@ ssh_host_pubkeys_update_known_hosts(struct ssh_cmd_ctx *cmd_ctx) goto done; } - while (dom) { + for (; dom; dom = dom->next) { sysdb = dom->sysdb; if (sysdb == NULL) { DEBUG(SSSDBG_FATAL_FAILURE, @@ -641,8 +641,6 @@ ssh_host_pubkeys_update_known_hosts(struct ssh_cmd_ctx *cmd_ctx) } talloc_free(hosts); - - dom = dom->next; } ret = fchmod(fd, 0644); |