summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-19 23:22:04 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-19 23:22:04 -0600
commitf05f9dc7532ea41c49b3e9385165d942dfab5d0e (patch)
tree773632ba00ce26dc07d8aa11cb1d1cedfd1de5b5 /kdesktop/lock
parent5f413b26ebaab8a6478427e4125bda628058ff85 (diff)
downloadtdebase-f05f9dc7532ea41c49b3e9385165d942dfab5d0e.tar.gz
tdebase-f05f9dc7532ea41c49b3e9385165d942dfab5d0e.zip
If someone manages to close down kdesktop_lock through an undiscovered security vulnerability such as http://security-tracker.debian.org/tracker/CVE-2012-0064, immediately terminate the compromised TDE session
Diffstat (limited to 'kdesktop/lock')
-rw-r--r--kdesktop/lock/lockprocess.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc
index 6bd18f771..2588bbfea 100644
--- a/kdesktop/lock/lockprocess.cc
+++ b/kdesktop/lock/lockprocess.cc
@@ -326,10 +326,8 @@ static int signal_pipe[2];
static void sigterm_handler(int)
{
if (!trinity_desktop_lock_in_sec_dlg) {
- char tmp = 'T';
- if (::write( signal_pipe[1], &tmp, 1) == -1) {
- // Error handler to shut up gcc warnings
- }
+ // Exit uncleanly
+ exit(1);
}
}
@@ -522,7 +520,7 @@ void LockProcess::setupSignals()
sigaddset(&(act.sa_mask), SIGQUIT);
act.sa_flags = 0;
sigaction(SIGQUIT, &act, 0L);
- // exit cleanly on SIGTERM
+ // exit uncleanly on SIGTERM
act.sa_handler= sigterm_handler;
sigemptyset(&(act.sa_mask));
sigaddset(&(act.sa_mask), SIGTERM);