|
|
|
@ -1226,6 +1226,24 @@ int LDAPManager::obtainKerberosTicket(LDAPCredentials creds, TQString principal,
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int LDAPManager::obtainKerberosServiceTicket(TQString principal, TQString *errstr) {
|
|
|
|
|
TQString ret;
|
|
|
|
|
TQString command = TQString("kgetcred \"%1\"").arg(principal);
|
|
|
|
|
FILE *output = popen(command.ascii(), "r");
|
|
|
|
|
TQFile f;
|
|
|
|
|
f.open(IO_ReadOnly, output);
|
|
|
|
|
TQTextStream stream(&f);
|
|
|
|
|
ret = stream.readLine();
|
|
|
|
|
f.close();
|
|
|
|
|
pclose(output);
|
|
|
|
|
|
|
|
|
|
if (ret != "") {
|
|
|
|
|
if (errstr) *errstr = ret;
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int LDAPManager::destroyKerberosTicket(TQString principal, TQString *errstr) {
|
|
|
|
|
TQString ret;
|
|
|
|
|
TQString command = TQString("kdestroy --credential=\"%1\"").arg(principal);
|
|
|
|
|