|
|
@ -47,9 +47,9 @@
|
|
|
|
// Some internal constants
|
|
|
|
// Some internal constants
|
|
|
|
#define CREATE_LIFE_CYCLE "01"
|
|
|
|
#define CREATE_LIFE_CYCLE "01"
|
|
|
|
|
|
|
|
|
|
|
|
#define TDM_CONTROL_FIFO_DIR "/tmp/ksocket-global/tdm"
|
|
|
|
#define TDM_CONTROL_FIFO_DIR "/tmp/tdesocket-global/tdm"
|
|
|
|
#define TDM_CONTROL_FIFO_FILE "/tmp/ksocket-global/tdm/tdmctl-%1"
|
|
|
|
#define TDM_CONTROL_FIFO_FILE "/tmp/tdesocket-global/tdm/tdmctl-%1"
|
|
|
|
#define TDM_CONTROL_FIFO_SAK_FILE "/tmp/ksocket-global/tdm/tdmctl-sak-%1"
|
|
|
|
#define TDM_CONTROL_FIFO_SAK_FILE "/tmp/tdesocket-global/tdm/tdmctl-sak-%1"
|
|
|
|
|
|
|
|
|
|
|
|
// In ckpass.o
|
|
|
|
// In ckpass.o
|
|
|
|
extern "C" {
|
|
|
|
extern "C" {
|
|
|
@ -362,7 +362,7 @@ int main (int argc, char *argv[])
|
|
|
|
int output = systemexec("echo \"exit\" | timeout 1 scriptor 2>/dev/null 1>/dev/null");
|
|
|
|
int output = systemexec("echo \"exit\" | timeout 1 scriptor 2>/dev/null 1>/dev/null");
|
|
|
|
if (output == 0) {
|
|
|
|
if (output == 0) {
|
|
|
|
printf("[DEBUG 400.1] Card inserted!\n\r"); fflush(stdout);
|
|
|
|
printf("[DEBUG 400.1] Card inserted!\n\r"); fflush(stdout);
|
|
|
|
systemexec("echo \"TAuthenticating SmartCard...\" > /tmp/ksocket-global/kdesktoplockcontrol &");
|
|
|
|
systemexec("echo \"TAuthenticating SmartCard...\" > /tmp/tdesocket-global/kdesktoplockcontrol &");
|
|
|
|
|
|
|
|
|
|
|
|
// Get card ATR
|
|
|
|
// Get card ATR
|
|
|
|
systemexec((TQString("echo \"RESET\" > %1/query").arg(secure_directory)).ascii());
|
|
|
|
systemexec((TQString("echo \"RESET\" > %1/query").arg(secure_directory)).ascii());
|
|
|
@ -494,7 +494,7 @@ int main (int argc, char *argv[])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
printf("[DEBUG 400.7] This card does not recognize this system!\n\r"); fflush(stdout);
|
|
|
|
printf("[DEBUG 400.7] This card does not recognize this system!\n\r"); fflush(stdout);
|
|
|
|
systemexec("echo \"EInvalid SmartCard Inserted\" > /tmp/ksocket-global/kdesktoplockcontrol &");
|
|
|
|
systemexec("echo \"EInvalid SmartCard Inserted\" > /tmp/tdesocket-global/kdesktoplockcontrol &");
|
|
|
|
sleep(1);
|
|
|
|
sleep(1);
|
|
|
|
smartcard_username="";
|
|
|
|
smartcard_username="";
|
|
|
|
unlink((TQString("%1/password").arg(secure_directory)).ascii());
|
|
|
|
unlink((TQString("%1/password").arg(secure_directory)).ascii());
|
|
|
@ -585,7 +585,7 @@ int main (int argc, char *argv[])
|
|
|
|
systemexec((TQString(TRINITY_BIN_PREFIX "tdmctl activate %1").arg(udisplay)).ascii());
|
|
|
|
systemexec((TQString(TRINITY_BIN_PREFIX "tdmctl activate %1").arg(udisplay)).ascii());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
systemexec("echo \"EUnauthorized SmartCard Inserted\" > /tmp/ksocket-global/kdesktoplockcontrol &");
|
|
|
|
systemexec("echo \"EUnauthorized SmartCard Inserted\" > /tmp/tdesocket-global/kdesktoplockcontrol &");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
@ -713,7 +713,7 @@ int main (int argc, char *argv[])
|
|
|
|
|
|
|
|
|
|
|
|
// if (loginok == 1) {
|
|
|
|
// if (loginok == 1) {
|
|
|
|
// Wait for SmartCard removal
|
|
|
|
// Wait for SmartCard removal
|
|
|
|
systemexec("echo \"C\" > /tmp/ksocket-global/kdesktoplockcontrol &");
|
|
|
|
systemexec("echo \"C\" > /tmp/tdesocket-global/kdesktoplockcontrol &");
|
|
|
|
timer=60;
|
|
|
|
timer=60;
|
|
|
|
output=0;
|
|
|
|
output=0;
|
|
|
|
|
|
|
|
|
|
|
@ -833,7 +833,7 @@ int main (int argc, char *argv[])
|
|
|
|
|
|
|
|
|
|
|
|
smartcard_username="";
|
|
|
|
smartcard_username="";
|
|
|
|
unlink("/etc/smartmon/minutesremaining");
|
|
|
|
unlink("/etc/smartmon/minutesremaining");
|
|
|
|
systemexec("echo \"C\" > /tmp/ksocket-global/kdesktoplockcontrol &");
|
|
|
|
systemexec("echo \"C\" > /tmp/tdesocket-global/kdesktoplockcontrol &");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|