1From 69eeb9f7baa14ca03b16c9de821f9876def7a36a Mon Sep 17 00:00:00 2001 2From: =?UTF-8?q?Gu=C3=A9nal=20DAVALAN?= <guenal.davalan@uca.fr> 3Date: Wed, 18 Nov 2020 08:40:45 +0100 4Subject: [PATCH] scan: limit access to shared memory segments to current user 5 6[Retrieved from: 7https://github.com/LibVNC/x11vnc/commit/69eeb9f7baa14ca03b16c9de821f9876def7a36a] 8Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 9--- 10 src/scan.c | 2 +- 11 1 file changed, 1 insertion(+), 1 deletion(-) 12 13diff --git a/src/scan.c b/src/scan.c 14index 43e00d2..12994d5 100644 15--- a/src/scan.c 16+++ b/src/scan.c 17@@ -320,7 +320,7 @@ static int shm_create(XShmSegmentInfo *shm, XImage **ximg_ptr, int w, int h, 18 19 #if HAVE_XSHM 20 shm->shmid = shmget(IPC_PRIVATE, 21- xim->bytes_per_line * xim->height, IPC_CREAT | 0777); 22+ xim->bytes_per_line * xim->height, IPC_CREAT | 0600); 23 24 if (shm->shmid == -1) { 25 rfbErr("shmget(%s) failed.\n", name); 26