diff options
author | Michele Calgaro <[email protected]> | 2019-03-10 17:24:02 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2019-03-10 17:24:02 +0900 |
commit | 7aa9258f19a31fd12da607e64e324e4c503d0cf4 (patch) | |
tree | a638bf1149b956e1cb0316c80adfe161c32d9883 /tdm/backend/session.c | |
parent | c80e5d45b719cf0a769410ecd90fb0156394d322 (diff) | |
download | tdebase-7aa9258f19a31fd12da607e64e324e4c503d0cf4.tar.gz tdebase-7aa9258f19a31fd12da607e64e324e4c503d0cf4.zip |
Fixed use of SAK in lock process when autologin is used in TDM.
This resolves bug 2945.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'tdm/backend/session.c')
-rw-r--r-- | tdm/backend/session.c | 25 |
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 )) |