Timothy Pearson 12 years ago
commit bdb1c6b002

@ -1024,7 +1024,7 @@ int LDAPManager::setPasswordForUser(LDAPUserInfo user, TQString *errstr) {
return 1; // Failure return 1; // Failure
} }
TQString tdelistDateTimeToRFCDateTime(TQString datetime) { TQString klistDateTimeToRFCDateTime(TQString datetime) {
// HACK HACK HACK // HACK HACK HACK
// FIXME // FIXME
TQString ret; TQString ret;
@ -1052,7 +1052,7 @@ TQString tdelistDateTimeToRFCDateTime(TQString datetime) {
#define KLIST_STOPTIME_STRING "End time: " #define KLIST_STOPTIME_STRING "End time: "
#define KLIST_FLAGS_STRING "Ticket flags: " #define KLIST_FLAGS_STRING "Ticket flags: "
#define KLIST_ADDRESSES_STRING "Ticket flags: " #define KLIST_ADDRESSES_STRING "Ticket flags: "
#define KLIST_NO_TICKET_FILE "tdelist: No ticket file: " #define KLIST_NO_TICKET_FILE "klist: No ticket file: "
#define KLIST_KVNO_STRING "kvno" #define KLIST_KVNO_STRING "kvno"
#define KLIST_ADDRESSLESS_STRING "addressless" #define KLIST_ADDRESSLESS_STRING "addressless"
@ -1085,10 +1085,10 @@ KerberosTicketInfoList LDAPManager::getKerberosTicketList(TQString cache, TQStri
TQString line; TQString line;
FILE *output; FILE *output;
if (cache != "") { if (cache != "") {
output = popen((TQString("tdelist --cache=%1 -v 2>&1").arg(cache)).ascii(), "r"); output = popen((TQString("klist --cache=%1 -v 2>&1").arg(cache)).ascii(), "r");
} }
else { else {
output = popen("tdelist -v 2>&1", "r"); output = popen("klist -v 2>&1", "r");
} }
TQFile f; TQFile f;
f.open(IO_ReadOnly, output); f.open(IO_ReadOnly, output);
@ -1154,7 +1154,7 @@ KerberosTicketInfoList LDAPManager::getKerberosTicketList(TQString cache, TQStri
line.remove(0, strlen(KLIST_AUTHTIME_STRING)); line.remove(0, strlen(KLIST_AUTHTIME_STRING));
line.replace("(expired)", ""); line.replace("(expired)", "");
line = line.simplifyWhiteSpace(); line = line.simplifyWhiteSpace();
line = tdelistDateTimeToRFCDateTime(line); line = klistDateTimeToRFCDateTime(line);
ticket.authenticationTime.setTime_t(KRFCDate::parseDate(line)); ticket.authenticationTime.setTime_t(KRFCDate::parseDate(line));
ticket.informationValid = true; ticket.informationValid = true;
} }
@ -1162,7 +1162,7 @@ KerberosTicketInfoList LDAPManager::getKerberosTicketList(TQString cache, TQStri
line.remove(0, strlen(KLIST_STARTTIME_STRING)); line.remove(0, strlen(KLIST_STARTTIME_STRING));
line.replace("(expired)", ""); line.replace("(expired)", "");
line = line.simplifyWhiteSpace(); line = line.simplifyWhiteSpace();
line = tdelistDateTimeToRFCDateTime(line); line = klistDateTimeToRFCDateTime(line);
ticket.validStartTime.setTime_t(KRFCDate::parseDate(line)); ticket.validStartTime.setTime_t(KRFCDate::parseDate(line));
ticket.informationValid = true; ticket.informationValid = true;
} }
@ -1170,7 +1170,7 @@ KerberosTicketInfoList LDAPManager::getKerberosTicketList(TQString cache, TQStri
line.remove(0, strlen(KLIST_STOPTIME_STRING)); line.remove(0, strlen(KLIST_STOPTIME_STRING));
line.replace("(expired)", ""); line.replace("(expired)", "");
line = line.simplifyWhiteSpace(); line = line.simplifyWhiteSpace();
line = tdelistDateTimeToRFCDateTime(line); line = klistDateTimeToRFCDateTime(line);
ticket.validEndTime.setTime_t(KRFCDate::parseDate(line)); ticket.validEndTime.setTime_t(KRFCDate::parseDate(line));
ticket.informationValid = true; ticket.informationValid = true;
} }

Loading…
Cancel
Save