|
|
|
@ -837,6 +837,14 @@ TQString readFullLineFromPtyProcess(PtyProcess* proc) {
|
|
|
|
|
while ((!result.contains("\r")) && (!result.contains(":")) && (!result.contains(">"))) {
|
|
|
|
|
result = result + TQString(proc->readLine(false));
|
|
|
|
|
tqApp->processEvents();
|
|
|
|
|
if (!TQFile::exists(TQString("/proc/%1/exe").arg(proc->pid()))) {
|
|
|
|
|
result.replace("\n", "");
|
|
|
|
|
result.replace("\r", "");
|
|
|
|
|
if (result == "") {
|
|
|
|
|
result = "TDE process terminated";
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
result.replace("\n", "");
|
|
|
|
|
result.replace("\r", "");
|
|
|
|
@ -1222,11 +1230,11 @@ int LDAPManager::obtainKerberosTicket(LDAPCredentials creds, TQString principal,
|
|
|
|
|
kadminProc.writeLine(creds.password, true);
|
|
|
|
|
do { // Discard our own input
|
|
|
|
|
prompt = readFullLineFromPtyProcess(&kadminProc);
|
|
|
|
|
printf("(kadmin) '%s'\n\r", prompt.ascii());
|
|
|
|
|
printf("(kinit) '%s'\n\r", prompt.ascii());
|
|
|
|
|
} while (prompt == "");
|
|
|
|
|
prompt = prompt.stripWhiteSpace();
|
|
|
|
|
}
|
|
|
|
|
if (prompt != "") {
|
|
|
|
|
if ((prompt != "") && (prompt != "TDE process terminated")) {
|
|
|
|
|
if (errstr) *errstr = prompt;
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|