From fce47f535c4a917821f01d6feda7073669198665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 11 Oct 2015 10:07:45 +0200 Subject: Terminate compositor in TDM unless a TDE or failsafe session was selected This relates to Bug 2521 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- tdm/kfrontend/kgapp.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tdm') diff --git a/tdm/kfrontend/kgapp.cpp b/tdm/kfrontend/kgapp.cpp index 2c78769bd..c0000aef0 100644 --- a/tdm/kfrontend/kgapp.cpp +++ b/tdm/kfrontend/kgapp.cpp @@ -553,7 +553,8 @@ kg_main( const char *argv0 ) } if (comp) { if (comp->isRunning()) { - if (_compositor == TDE_COMPOSITOR_BINARY) { + if (((login_session_wm == "tde") || (login_session_wm == "trinity") || (login_session_wm == "failsafe")) && + (_compositor == TDE_COMPOSITOR_BINARY)) { // Change process UID // Get user UID passwd* userinfo = getpwnam(login_user.ascii()); @@ -566,9 +567,12 @@ kg_main( const char *argv0 ) comp->writeStdin(newuid.ascii(), newuid.length()); usleep(50000); // Give the above function some time to execute. Note that on REALLY slow systems this could fail, leaving kompmgr running as root. TODO: Look into ways to make this more robust. } + comp->closeStdin(); + comp->detach(); + } + else { + comp->kill(); } - comp->closeStdin(); - comp->detach(); } delete comp; } -- cgit v1.2.3