diff options
Diffstat (limited to 'src/corelib/kernel/qsharedmemory_unix.cpp')
-rw-r--r-- | src/corelib/kernel/qsharedmemory_unix.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp index fd2bc97b2d..6bcb4076b4 100644 --- a/src/corelib/kernel/qsharedmemory_unix.cpp +++ b/src/corelib/kernel/qsharedmemory_unix.cpp @@ -197,7 +197,7 @@ bool QSharedMemoryPrivate::create(int size) } // create - if (-1 == shmget(unix_key, size, 0666 | IPC_CREAT | IPC_EXCL)) { + if (-1 == shmget(unix_key, size, 0600 | IPC_CREAT | IPC_EXCL)) { QString function = QLatin1String("QSharedMemory::create"); switch (errno) { case EINVAL: @@ -218,7 +218,7 @@ bool QSharedMemoryPrivate::create(int size) bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode mode) { // grab the shared memory segment id - int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0444 : 0660)); + int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0400 : 0600)); if (-1 == id) { setErrorString(QLatin1String("QSharedMemory::attach (shmget)")); return false; @@ -263,7 +263,7 @@ bool QSharedMemoryPrivate::detach() size = 0; // Get the number of current attachments - int id = shmget(unix_key, 0, 0444); + int id = shmget(unix_key, 0, 0400); cleanHandle(); struct shmid_ds shmid_ds; |