0002-scan-limit-access-to-shared-memory-segments-to-curre.patch 926 B

123456789101112131415161718192021222324252627
  1. From 3870280eca9c10a3607440209e9caf6d7749e379 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. Upstream: https://github.com/LibVNC/x11vnc/commit/69eeb9f7baa14ca03b16c9de821f9876def7a36a
  6. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  7. ---
  8. src/scan.c | 2 +-
  9. 1 file changed, 1 insertion(+), 1 deletion(-)
  10. diff --git a/src/scan.c b/src/scan.c
  11. index 43e00d2..12994d5 100644
  12. --- a/src/scan.c
  13. +++ b/src/scan.c
  14. @@ -320,7 +320,7 @@ static int shm_create(XShmSegmentInfo *shm, XImage **ximg_ptr, int w, int h,
  15. #if HAVE_XSHM
  16. shm->shmid = shmget(IPC_PRIVATE,
  17. - xim->bytes_per_line * xim->height, IPC_CREAT | 0777);
  18. + xim->bytes_per_line * xim->height, IPC_CREAT | 0600);
  19. if (shm->shmid == -1) {
  20. rfbErr("shmget(%s) failed.\n", name);
  21. --
  22. 2.43.0