aboutsummaryrefslogtreecommitdiffstats
path: root/main/lxterminal/CVE-2016-10369.patch
diff options
context:
space:
mode:
authorDaniel Sabogal <dsabogalcc@gmail.com>2017-08-07 11:39:54 -0400
committerSören Tempel <soeren+git@soeren-tempel.net>2017-08-22 23:16:37 +0200
commit1e49fb2fed3a645ef6f77d40314c8aab20c8fa6a (patch)
treefb56dd6b3234122e826c2b98c45c468608711f25 /main/lxterminal/CVE-2016-10369.patch
parent1c0b7832bcd99561ec460174fd75dee6941e8d1a (diff)
downloadaports-1e49fb2fed3a645ef6f77d40314c8aab20c8fa6a.tar.bz2
aports-1e49fb2fed3a645ef6f77d40314c8aab20c8fa6a.tar.xz
main/lxterminal: security fix for CVE-2016-10369
Diffstat (limited to 'main/lxterminal/CVE-2016-10369.patch')
-rw-r--r--main/lxterminal/CVE-2016-10369.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/main/lxterminal/CVE-2016-10369.patch b/main/lxterminal/CVE-2016-10369.patch
new file mode 100644
index 0000000000..170ad884be
--- /dev/null
+++ b/main/lxterminal/CVE-2016-10369.patch
@@ -0,0 +1,26 @@
+From f99163c6ff8b2f57c5f37b1ce5d62cf7450d4648 Mon Sep 17 00:00:00 2001
+From: Yao Wei <mwei@lxde.org>
+Date: Mon, 8 May 2017 00:47:55 +0800
+Subject: [PATCH] fix: use g_get_user_runtime_dir for socket directory
+
+This bug is pointed out by stackexchange user that putting socket file in
+/tmp is a potential risk. Putting the socket dir in user directory could
+mitigate the risk.
+---
+ src/unixsocket.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/unixsocket.c b/src/unixsocket.c
+index 4c660ac..f88284c 100644
+--- a/src/unixsocket.c
++++ b/src/unixsocket.c
+@@ -140,7 +140,8 @@ gboolean lxterminal_socket_initialize(LXTermWindow * lxtermwin, gint argc, gchar
+ * This function returns TRUE if this process should keep running and FALSE if it should exit. */
+
+ /* Formulate the path for the Unix domain socket. */
+- gchar * socket_path = g_strdup_printf("/tmp/.lxterminal-socket%s-%s", gdk_display_get_name(gdk_display_get_default()), g_get_user_name());
++ gchar * socket_path = g_strdup_printf("%s/.lxterminal-socket-%s", g_get_user_runtime_dir(), gdk_display_get_name(gdk_display_get_default()));
++ printf("%s\n", socket_path);
+
+ /* Create socket. */
+ int fd = socket(PF_UNIX, SOCK_STREAM, 0);