diff --git a/lib/mesa/src/gallium/winsys/sw/dri/dri_sw_winsys.c b/lib/mesa/src/gallium/winsys/sw/dri/dri_sw_winsys.c index c0200f939..31ce66d64 100644 --- a/lib/mesa/src/gallium/winsys/sw/dri/dri_sw_winsys.c +++ b/lib/mesa/src/gallium/winsys/sw/dri/dri_sw_winsys.c @@ -93,7 +93,8 @@ alloc_shm(struct dri_sw_displaytarget *dri_sw_dt, unsigned size) { char *addr; - dri_sw_dt->shmid = shmget(IPC_PRIVATE, size, IPC_CREAT|0777); + /* 0600 = user read+write */ + dri_sw_dt->shmid = shmget(IPC_PRIVATE, size, IPC_CREAT | 0600); if (dri_sw_dt->shmid < 0) return NULL; diff --git a/lib/mesa/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c b/lib/mesa/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c index a4c1d5045..7099842c9 100644 --- a/lib/mesa/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c +++ b/lib/mesa/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c @@ -126,7 +126,8 @@ alloc_shm(struct xlib_displaytarget *buf, unsigned size) shminfo->shmid = -1; shminfo->shmaddr = (char *) -1; - shminfo->shmid = shmget(IPC_PRIVATE, size, IPC_CREAT|0777); + /* 0600 = user read+write */ + shminfo->shmid = shmget(IPC_PRIVATE, size, IPC_CREAT | 0600); if (shminfo->shmid < 0) { return NULL; } diff --git a/lib/mesa/src/mesa/drivers/x11/xm_buffer.c b/lib/mesa/src/mesa/drivers/x11/xm_buffer.c index d945d8af5..0da08a6e6 100644 --- a/lib/mesa/src/mesa/drivers/x11/xm_buffer.c +++ b/lib/mesa/src/mesa/drivers/x11/xm_buffer.c @@ -89,8 +89,9 @@ alloc_back_shm_ximage(XMesaBuffer b, GLuint width, GLuint height) return GL_FALSE; } + /* 0600 = user read+write */ b->shminfo.shmid = shmget(IPC_PRIVATE, b->backxrb->ximage->bytes_per_line - * b->backxrb->ximage->height, IPC_CREAT|0777); + * b->backxrb->ximage->height, IPC_CREAT | 0600); if (b->shminfo.shmid < 0) { _mesa_warning(NULL, "shmget failed while allocating back buffer.\n"); XDestroyImage(b->backxrb->ximage);