termux-packages/x11-packages/xrdp/fix-rfbauth-with-no-passwd-file.patch
2022-05-05 08:55:30 +09:00

19 lines
871 B
Diff

Fixes https://github.com/termux/termux-packages/issues/10220.
--- a/sesman/session.c
+++ b/sesman/session.c
@@ -768,8 +768,11 @@
list_add_item(xserver_params, (tintptr)g_strdup(geometry));
list_add_item(xserver_params, (tintptr)g_strdup("-depth"));
list_add_item(xserver_params, (tintptr)g_strdup(depth));
- list_add_item(xserver_params, (tintptr)g_strdup("-rfbauth"));
- list_add_item(xserver_params, (tintptr)g_strdup(passwd_file));
+ if (passwd_file != 0 && *passwd_file != '\0')
+ {
+ list_add_item(xserver_params, (tintptr)g_strdup("-rfbauth"));
+ list_add_item(xserver_params, (tintptr)g_strdup(passwd_file));
+ }
g_free(passwd_file);