0002-scan-limit-access-to-shared-memory-segments-to-current-user.patch 922 B

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