diff options
author | Timothy Pearson <[email protected]> | 2012-01-19 23:22:04 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-01-19 23:22:04 -0600 |
commit | f05f9dc7532ea41c49b3e9385165d942dfab5d0e (patch) | |
tree | 773632ba00ce26dc07d8aa11cb1d1cedfd1de5b5 /kdesktop/lock/lockprocess.cc | |
parent | 5f413b26ebaab8a6478427e4125bda628058ff85 (diff) | |
download | tdebase-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/lockprocess.cc')
-rw-r--r-- | kdesktop/lock/lockprocess.cc | 8 |
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); |