summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication_p.h
diff options
context:
space:
mode:
authorRichard J. Moore <rich@kde.org>2014-01-01 16:58:19 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-07 13:04:18 +0100
commitb12b1ddf4880a5157b5edac05e0ef381e9148aae (patch)
treec7354803380ebfffef49fc8bacca4e37b61c5d06 /src/corelib/kernel/qcoreapplication_p.h
parent9b19a69c89c07b02ab631c1ccfd4d89013b6ec45 (diff)
Prevent foolish use of setuid when using Qt.
In order to prevent people from shooting themselves in the foot, abort if we're running setuid. This behavior can be disabled by calling QCoreApplication::setSetuidAllowed(true) in order to support legacy code. [ChangeLog][QtCore][Important Behavior Changes] Running Qt applications that are setuid has been prevented. If you really need to do this then you can call QCoreApplication::setSetuidAllowed(true) before creating the QCoreApplication instance. Change-Id: I992a9a0cd8420693d438852a05666e3dbb2c9d6a Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/corelib/kernel/qcoreapplication_p.h')
-rw-r--r--src/corelib/kernel/qcoreapplication_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h
index 0c00f396b5..c3d83112ae 100644
--- a/src/corelib/kernel/qcoreapplication_p.h
+++ b/src/corelib/kernel/qcoreapplication_p.h
@@ -153,6 +153,7 @@ public:
static bool is_app_closing;
#endif
+ static bool setuidAllowed;
static uint attribs;
static inline bool testAttribute(uint flag) { return attribs & (1 << flag); }
static int app_compile_version;