diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-04-20 01:49:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-04-20 01:49:53 +0000 |
commit | 1d558b0bda448c839f784a5dfa208782f90972f6 (patch) | |
tree | 09b44556072be5f84720feccb1be3fbccb0a979f /kdesktop/lock/lockprocess.cc | |
parent | 41ed1803aad800508544d952a63e75c0a3320c0d (diff) | |
download | tdebase-1d558b0bda448c839f784a5dfa208782f90972f6.tar.gz tdebase-1d558b0bda448c839f784a5dfa208782f90972f6.zip |
Security update to kdesktop_lock
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1116659 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdesktop/lock/lockprocess.cc')
-rw-r--r-- | kdesktop/lock/lockprocess.cc | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc index 1e4e64940..685864d10 100644 --- a/kdesktop/lock/lockprocess.cc +++ b/kdesktop/lock/lockprocess.cc @@ -67,6 +67,7 @@ #include <sys/types.h> #include <fcntl.h> +#include <kcrash.h> #include <linux/stat.h> @@ -104,7 +105,7 @@ Status DPMSInfo ( Display *, CARD16 *, BOOL * ); // These lines are taken on 10/2009 from X.org (X11/XF86keysym.h), defining some special multimedia keys #define XF86XK_AudioMute 0x1008FF12 #define XF86XK_AudioRaiseVolume 0x1008FF13 -#define XF86XK_AudioLowerVolume 0x1008FF +#define XF86XK_AudioLowerVolume 0x1008FF11 #define XF86XK_Display 0x1008FF59 static Window gVRoot = 0; @@ -112,6 +113,11 @@ static Window gVRootData = 0; static Atom gXA_VROOT; static Atom gXA_SCREENSAVER_VERSION; +static void segv_handler(int) +{ + printf("[kdesktop_lock] WARNING: A fatal exception was encountered. Trapping and ignoring it so as not to compromise desktop security...\n\r"); +} + //=========================================================================== // // Screen saver handling process. Handles screensaver window, @@ -206,6 +212,8 @@ LockProcess::LockProcess(bool child, bool useBlankOnly) #endif greetPlugin.library = 0; + + KCrash::setCrashHandler(segv_handler); } //--------------------------------------------------------------------------- @@ -638,10 +646,14 @@ void LockProcess::createSaverWindow() void LockProcess::desktopResized() { + if (currentDialog != NULL) { + mForceReject = true; + currentDialog->close(); + } + // Get root window size XWindowAttributes rootAttr; - XGetWindowAttributes(qt_xdisplay(), RootWindow(qt_xdisplay(), - qt_xscreen()), &rootAttr); + XGetWindowAttributes(qt_xdisplay(), RootWindow(qt_xdisplay(), qt_xscreen()), &rootAttr); mRootWidth = rootAttr.width; mRootHeight = rootAttr.height; @@ -650,11 +662,6 @@ void LockProcess::desktopResized() // Restart the hack as the window size is now different stopHack(); startHack(); - - if (currentDialog != NULL) { - mForceReject = true; - currentDialog->close(); - } } //--------------------------------------------------------------------------- |