GUACAMOLE-527: Make sure ssh_known_hosts exists before trying to load.
This commit is contained in:
parent
428243bb78
commit
27c977adb2
@ -35,6 +35,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
guac_common_ssh_key* guac_common_ssh_key_alloc(char* data, int length,
|
||||
char* passphrase) {
|
||||
@ -268,6 +269,7 @@ int guac_common_ssh_verify_host_key(LIBSSH2_SESSION* session, guac_client* clien
|
||||
else {
|
||||
|
||||
const char *guac_known_hosts = "/etc/guacamole/ssh_known_hosts";
|
||||
if (access(guac_known_hosts, F_OK) != -1)
|
||||
known_hosts = libssh2_knownhost_readfile(ssh_known_hosts, guac_known_hosts, LIBSSH2_KNOWNHOST_FILE_OPENSSH);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user