From e3e75464fbeb30114e41104ddca29ebf957b8b76 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 24 Dec 2021 15:45:28 -0800 Subject: [PATCH] GUACAMOLE-1190: Explicitly use "localhost" as guacd default bind host, matching default of webapp. --- src/guacd/conf-file.c | 4 ++-- src/guacd/conf.h | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/guacd/conf-file.c b/src/guacd/conf-file.c index 460ec95e..1f1e5669 100644 --- a/src/guacd/conf-file.c +++ b/src/guacd/conf-file.c @@ -176,8 +176,8 @@ guacd_config* guacd_conf_load() { return NULL; /* Load defaults */ - conf->bind_host = NULL; - conf->bind_port = strdup("4822"); + conf->bind_host = strdup(GUACD_DEFAULT_BIND_HOST); + conf->bind_port = strdup(GUACD_DEFAULT_BIND_PORT); conf->pidfile = NULL; conf->foreground = 0; conf->print_version = 0; diff --git a/src/guacd/conf.h b/src/guacd/conf.h index f444cee5..dd571736 100644 --- a/src/guacd/conf.h +++ b/src/guacd/conf.h @@ -24,6 +24,18 @@ #include +/** + * The default host that guacd should bind to, if no other host is explicitly + * specified. + */ +#define GUACD_DEFAULT_BIND_HOST "localhost" + +/** + * The default port that guacd should bind to, if no other port is explicitly + * specified. + */ +#define GUACD_DEFAULT_BIND_PORT "4822" + /** * The contents of a guacd configuration file. */