summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-12-22 16:32:12 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-18 06:05:19 (GMT)
commit20b26bdb3dd5e46b01b9a7e1ce8342074df3c89c (patch)
treeeb185bea4efd92b789c569e1038b5f4218fae321 /src/plugins
parent0e8030bf479eb08bb718899f698a3f513eb36844 (diff)
downloadQt-20b26bdb3dd5e46b01b9a7e1ce8342074df3c89c.zip
Qt-20b26bdb3dd5e46b01b9a7e1ce8342074df3c89c.tar.gz
Qt-20b26bdb3dd5e46b01b9a7e1ce8342074df3c89c.tar.bz2
Change all shmget calls to user-only memory
Drop the read and write permissions for group and other users in the system. Change-Id: I8fc753f09126651af3fb82df3049050f0b14e876 (cherry-picked from Qt 5 commit 856f209fb63ae336bfb389a12d2a75fa886dc1c5) Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindowsurface.cpp2
-rw-r--r--src/plugins/platforms/xlib/qxlibwindowsurface.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindowsurface.cpp b/src/plugins/platforms/xcb/qxcbwindowsurface.cpp
index b6a42d8..0d56821 100644
--- a/src/plugins/platforms/xcb/qxcbwindowsurface.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindowsurface.cpp
@@ -98,7 +98,7 @@ QXcbShmImage::QXcbShmImage(QXcbScreen *screen, const QSize &size, uint depth, QI
0);
m_shm_info.shmid = shmget (IPC_PRIVATE,
- m_xcb_image->stride * m_xcb_image->height, IPC_CREAT|0777);
+ m_xcb_image->stride * m_xcb_image->height, IPC_CREAT|0600);
m_shm_info.shmaddr = m_xcb_image->data = (quint8 *)shmat (m_shm_info.shmid, 0, 0);
m_shm_info.shmseg = xcb_generate_id(xcb_connection());
diff --git a/src/plugins/platforms/xlib/qxlibwindowsurface.cpp b/src/plugins/platforms/xlib/qxlibwindowsurface.cpp
index bf003eb..46a2f97 100644
--- a/src/plugins/platforms/xlib/qxlibwindowsurface.cpp
+++ b/src/plugins/platforms/xlib/qxlibwindowsurface.cpp
@@ -99,7 +99,7 @@ void QXlibWindowSurface::resizeShmImage(int width, int height)
image_info->shminfo.shmid = shmget (IPC_PRIVATE,
- image->bytes_per_line * image->height, IPC_CREAT|0777);
+ image->bytes_per_line * image->height, IPC_CREAT|0700);
image_info->shminfo.shmaddr = image->data = (char*)shmat (image_info->shminfo.shmid, 0, 0);
image_info->shminfo.readOnly = False;