Fix klist failure

pull/1/head
Timothy Pearson 12 years ago
parent a3118cb55b
commit 20c48849ea

@ -992,7 +992,7 @@ int LDAPManager::setPasswordForUser(LDAPUserInfo user, TQString *errstr) {
return 1; // Failure
}
TQString tdelistDateTimeToRFCDateTime(TQString datetime) {
TQString klistDateTimeToRFCDateTime(TQString datetime) {
// HACK HACK HACK
// FIXME
TQString ret;
@ -1020,7 +1020,7 @@ TQString tdelistDateTimeToRFCDateTime(TQString datetime) {
#define KLIST_STOPTIME_STRING "End time: "
#define KLIST_FLAGS_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_ADDRESSLESS_STRING "addressless"
@ -1053,10 +1053,10 @@ KerberosTicketInfoList LDAPManager::getKerberosTicketList(TQString cache, TQStri
TQString line;
FILE *output;
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 {
output = popen("tdelist -v 2>&1", "r");
output = popen("klist -v 2>&1", "r");
}
TQFile f;
f.open(IO_ReadOnly, output);
@ -1122,7 +1122,7 @@ KerberosTicketInfoList LDAPManager::getKerberosTicketList(TQString cache, TQStri
line.remove(0, strlen(KLIST_AUTHTIME_STRING));
line.replace("(expired)", "");
line = line.simplifyWhiteSpace();
line = tdelistDateTimeToRFCDateTime(line);
line = klistDateTimeToRFCDateTime(line);
ticket.authenticationTime.setTime_t(KRFCDate::parseDate(line));
ticket.informationValid = true;
}
@ -1130,7 +1130,7 @@ KerberosTicketInfoList LDAPManager::getKerberosTicketList(TQString cache, TQStri
line.remove(0, strlen(KLIST_STARTTIME_STRING));
line.replace("(expired)", "");
line = line.simplifyWhiteSpace();
line = tdelistDateTimeToRFCDateTime(line);
line = klistDateTimeToRFCDateTime(line);
ticket.validStartTime.setTime_t(KRFCDate::parseDate(line));
ticket.informationValid = true;
}
@ -1138,7 +1138,7 @@ KerberosTicketInfoList LDAPManager::getKerberosTicketList(TQString cache, TQStri
line.remove(0, strlen(KLIST_STOPTIME_STRING));
line.replace("(expired)", "");
line = line.simplifyWhiteSpace();
line = tdelistDateTimeToRFCDateTime(line);
line = klistDateTimeToRFCDateTime(line);
ticket.validEndTime.setTime_t(KRFCDate::parseDate(line));
ticket.informationValid = true;
}

Loading…
Cancel
Save