summaryrefslogtreecommitdiffstats
path: root/tdm/backend/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'tdm/backend/session.c')
-rw-r--r--tdm/backend/session.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/tdm/backend/session.c b/tdm/backend/session.c
index 4b5f372db..0bcd92d5f 100644
--- a/tdm/backend/session.c
+++ b/tdm/backend/session.c
@@ -34,6 +34,8 @@ from the copyright holder.
* subdaemon event loop, etc.
*/
+
+#include "tdmconfig.h"
#include "dm.h"
#include "dm_error.h"
@@ -49,6 +51,8 @@ from the copyright holder.
#include "consolekit.h"
#endif
+#define TSAK_FIFO_FILE "/tmp/tdesocket-global/tsak"
+
struct display *td;
const char *td_setup = "auto";
@@ -576,6 +580,27 @@ ManageSession( struct display *d )
goto regreet;
}
+ int start_tsak = 0;
+#ifdef BUILD_TSAK
+ start_tsak = d->useSAK;
+#endif
+ if (start_tsak) {
+ if (system(KDE_BINDIR "/tsak checkdeps") != 0) {
+ start_tsak = 0;
+ }
+ }
+ if (start_tsak) {
+ int ret_pid = fork();
+ if (ret_pid == 0) {
+ // Child process
+ system(KDE_BINDIR "/tsak");
+ exit(0);
+ }
+ }
+ else {
+ remove(TSAK_FIFO_FILE);
+ }
+
tdiff = time( 0 ) - td->hstent->lastExit - td->openDelay;
if (AutoLogon( tdiff )) {
if (!Verify( conv_auto, FALSE ))