From 7c9c791f79612f1a4c7802e676af07546d454576 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 8 Jan 2013 15:50:54 +0100 Subject: set pkg-config host_bins directly to install dir qmake tries to replace all occurrences of the install prefix with a literal ${prefix}. of course this would mess up build paths which happen to live under the prefix (this is untypical, but still), which would break the sed magic in the subsequent install step. as qmake itself has no use for the .pc files, it's ok to target them directly for the install dir. we do the same with the include and lib dirs already. Task-number: QTBUG-28807 Change-Id: I53d7f0f3b357f67f30bea07554794f60160376cd Reviewed-by: Joerg Bornemann --- src/corelib/corelib.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib') diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index f95ee545c0..bf2fd3c84a 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -50,7 +50,7 @@ QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtCore.dynlist contains(DEFINES,QT_EVAL):include(eval.pri) -HOST_BINS = $$[QT_HOST_BINS] +HOST_BINS = $$[QT_HOST_BINS/raw] host_bins.name = host_bins host_bins.variable = HOST_BINS -- cgit v1.2.3 From 856f209fb63ae336bfb389a12d2a75fa886dc1c5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 21 Dec 2012 10:07:53 -0800 Subject: 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 Reviewed-by: Richard J. Moore --- src/corelib/kernel/qsharedmemory_unix.cpp | 6 +++--- src/corelib/kernel/qsystemsemaphore_unix.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/corelib') 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; diff --git a/src/corelib/kernel/qsystemsemaphore_unix.cpp b/src/corelib/kernel/qsystemsemaphore_unix.cpp index e67fb42285..303f0c7725 100644 --- a/src/corelib/kernel/qsystemsemaphore_unix.cpp +++ b/src/corelib/kernel/qsystemsemaphore_unix.cpp @@ -136,10 +136,10 @@ key_t QSystemSemaphorePrivate::handle(QSystemSemaphore::AccessMode mode) } // Get semaphore - semaphore = semget(unix_key, 1, 0666 | IPC_CREAT | IPC_EXCL); + semaphore = semget(unix_key, 1, 0600 | IPC_CREAT | IPC_EXCL); if (-1 == semaphore) { if (errno == EEXIST) - semaphore = semget(unix_key, 1, 0666 | IPC_CREAT); + semaphore = semget(unix_key, 1, 0600 | IPC_CREAT); if (-1 == semaphore) { setErrorString(QLatin1String("QSystemSemaphore::handle")); cleanHandle(); -- cgit v1.2.3