diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2015-10-11 10:07:45 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2015-10-11 10:08:45 +0200 |
commit | 405d9087ce6f45150e2a94580def88624ac6121c (patch) | |
tree | 518e6710aa97397d7c247e380706cedb9dcdfa3b /tdm | |
parent | 604b02fe361c1f3254e1a86fde449c542a970afd (diff) | |
download | tdebase-405d9087ce6f45150e2a94580def88624ac6121c.tar.gz tdebase-405d9087ce6f45150e2a94580def88624ac6121c.zip |
Terminate compositor in TDM unless a TDE or failsafe session was selected
This relates to Bug 2521
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit fce47f535c4a917821f01d6feda7073669198665)
Diffstat (limited to 'tdm')
-rw-r--r-- | tdm/kfrontend/kgapp.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tdm/kfrontend/kgapp.cpp b/tdm/kfrontend/kgapp.cpp index 318d6bd07..91c71b69d 100644 --- a/tdm/kfrontend/kgapp.cpp +++ b/tdm/kfrontend/kgapp.cpp @@ -520,7 +520,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()); @@ -533,9 +534,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; } |