summaryrefslogtreecommitdiffstats
path: root/kdecore/kapplication.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-02 21:21:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-02 21:21:15 +0000
commit96900dbce3aaa1fcac74a07a71482c5c6fcd3cab (patch)
treebf3fc68d0dcc660fce0e21171373a2d4e2395707 /kdecore/kapplication.cpp
parent5f99bff82d3413803bcc652999f4f631058179d6 (diff)
downloadtdelibs-96900dbce3aaa1fcac74a07a71482c5c6fcd3cab.tar.gz
tdelibs-96900dbce3aaa1fcac74a07a71482c5c6fcd3cab.zip
* Large set of SuSE patches to fix bugs and add functionality
* kdemm is included but not used by knotify as it does not work out of the box git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1171141 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdecore/kapplication.cpp')
-rw-r--r--kdecore/kapplication.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/kdecore/kapplication.cpp b/kdecore/kapplication.cpp
index 8edc1d170..3dc8ca77d 100644
--- a/kdecore/kapplication.cpp
+++ b/kdecore/kapplication.cpp
@@ -41,6 +41,7 @@
#include <tqtooltip.h>
#include <tqstylefactory.h>
#include <tqmetaobject.h>
+#include <tqimage.h>
#ifndef QT_NO_SQL
#include <tqsqlpropertymap.h>
#endif
@@ -87,6 +88,8 @@
#include <sys/stat.h>
#endif
#include <sys/wait.h>
+#include <grp.h>
+#include <sys/types.h>
#ifndef Q_WS_WIN
#include "kwin.h"
@@ -776,10 +779,15 @@ void KApplication::init(bool GUIenabled)
{
d->guiEnabled = GUIenabled;
if ((getuid() != geteuid()) ||
- (getgid() != getegid()))
+ (getgid() != getegid()) )
{
- fprintf(stderr, "The KDE libraries are not designed to run with suid privileges.\n");
- ::exit(127);
+ // man permissions are not exploitable and better than
+ // world writable directories
+ struct group *man = getgrnam("man");
+ if ( !man || man->gr_gid != getegid() ){
+ fprintf(stderr, "The KDE libraries are not designed to run with suid privileges.\n");
+ ::exit(127);
+ }
}
KProcessController::ref();
@@ -2137,6 +2145,12 @@ void KApplication::propagateSettings(SettingsCategory arg)
KConfigBase* config = KGlobal::config();
KConfigGroupSaver saver( config, "KDE" );
+#ifdef QT_HAVE_MAX_IMAGE_SIZE
+ TQSize maxImageSize(4096, 4096);
+ maxImageSize = config->readSizeEntry("MaxImageSize", &maxImageSize);
+ TQImage::setMaxImageSize(maxImageSize);
+#endif
+
int num = config->readNumEntry("CursorBlinkRate", TQApplication::cursorFlashTime());
if ((num != 0) && (num < 200))
num = 200;