VNC auth: Do not try to create empty file
When using UDS mode for VNC, the following error has been reported: [WARN ] Cannot write VNC password hash to file (null): Bad address This prevents an attempt to create a file with a NULL name.
This commit is contained in:
@@ -441,7 +441,6 @@ prepare_xvnc_xserver_params(const struct session_parameters *s,
|
|||||||
g_snprintf(depth, sizeof(depth), "%d", s->bpp);
|
g_snprintf(depth, sizeof(depth), "%d", s->bpp);
|
||||||
|
|
||||||
guid_to_str(&s->guid, guid_str);
|
guid_to_str(&s->guid, guid_str);
|
||||||
env_check_password_file(passwd_file, guid_str);
|
|
||||||
|
|
||||||
/* get path of Xvnc from config */
|
/* get path of Xvnc from config */
|
||||||
xserver = (const char *)list_get_item(g_cfg->vnc_params, 0);
|
xserver = (const char *)list_get_item(g_cfg->vnc_params, 0);
|
||||||
@@ -457,6 +456,7 @@ prepare_xvnc_xserver_params(const struct session_parameters *s,
|
|||||||
if (passwd_file != NULL)
|
if (passwd_file != NULL)
|
||||||
{
|
{
|
||||||
/* RFB authorization */
|
/* RFB authorization */
|
||||||
|
env_check_password_file(passwd_file, guid_str);
|
||||||
list_add_strdup_multi(params,
|
list_add_strdup_multi(params,
|
||||||
"-rfbauth", passwd_file,
|
"-rfbauth", passwd_file,
|
||||||
NULL);
|
NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user