diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-12-22 16:32:12 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-18 06:05:19 (GMT) |
commit | 20b26bdb3dd5e46b01b9a7e1ce8342074df3c89c (patch) | |
tree | eb185bea4efd92b789c569e1038b5f4218fae321 /tools/qvfb | |
parent | 0e8030bf479eb08bb718899f698a3f513eb36844 (diff) | |
download | Qt-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 'tools/qvfb')
-rw-r--r-- | tools/qvfb/qvfbshmem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/qvfb/qvfbshmem.cpp b/tools/qvfb/qvfbshmem.cpp index 7f9671f..84b6ebe 100644 --- a/tools/qvfb/qvfbshmem.cpp +++ b/tools/qvfb/qvfbshmem.cpp @@ -176,13 +176,13 @@ QShMemViewProtocol::QShMemViewProtocol(int displayid, const QSize &s, uint data_offset_value = sizeof(QVFbHeader); int dataSize = bpl * h + data_offset_value; - shmId = shmget(key, dataSize, IPC_CREAT | 0666); + shmId = shmget(key, dataSize, IPC_CREAT | 0600); if (shmId != -1) data = (unsigned char *)shmat(shmId, 0, 0); else { struct shmid_ds shm; shmctl(shmId, IPC_RMID, &shm); - shmId = shmget(key, dataSize, IPC_CREAT | 0666); + shmId = shmget(key, dataSize, IPC_CREAT | 0600); if (shmId == -1) { perror("QShMemViewProtocol::QShMemViewProtocol"); qFatal("Cannot get shared memory 0x%08x", key); |