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 fce47f535c)
pull/182/head
Slávek Banko 9 years ago
parent 604b02fe36
commit 405d9087ce

@ -520,7 +520,8 @@ kg_main( const char *argv0 )
} }
if (comp) { if (comp) {
if (comp->isRunning()) { 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 // Change process UID
// Get user UID // Get user UID
passwd* userinfo = getpwnam(login_user.ascii()); passwd* userinfo = getpwnam(login_user.ascii());
@ -533,10 +534,13 @@ kg_main( const char *argv0 )
comp->writeStdin(newuid.ascii(), newuid.length()); 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. 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->closeStdin();
comp->detach(); comp->detach();
} }
else {
comp->kill();
}
}
delete comp; delete comp;
} }
if (twin) { if (twin) {

Loading…
Cancel
Save