@ -1111,17 +1111,14 @@ int LDAPManager::updateUserInfo(LDAPUserInfo user, TQString *errstr) {
}
}
// WARNING
// kadmin does not have a standard "waiting for user input" character or sequence
// To make matters worse, the colon does not uniquely designate the end of a line; for example the response "kadmin: ext openldap/foo.bar.baz: Principal does not exist"
// One way around this would be to see if the first colon is part of a "kadmin:" string; if so, then the colon is not a reliable end of line indicator for the current line
// (in fact only '\r' should be used as the end of line indicator in that case)
// FIXME
// Convert anything relying on this method to the Heimdal C API
if(errstr)*errstr=i18n("%1<p>Details:<br>Failed to execute krb5_parse_name for user '%2' (code %3)").arg(krb5_get_error_message(m_krb5admContext,krb5adm_ret)).arg(user.name).arg(krb5adm_ret);
@ -1622,15 +1619,15 @@ int LDAPManager::obtainKerberosTicket(LDAPCredentials creds, TQString principal,
}
TQStringprompt;
PtyProcesskadminProc;
kadminProc.exec(command,args);
prompt=readFullLineFromPtyProcess(&kadminProc);
PtyProcesskinitProc;
kinitProc.exec(command,args);
prompt=readFullLineFromPtyProcess(&kinitProc);
prompt=prompt.stripWhiteSpace();
if(prompt.endsWith(" Password:")){
kadminProc.enableLocalEcho(false);
kadminProc.writeLine(creds.password,true);
kinitProc.enableLocalEcho(false);
kinitProc.writeLine(creds.password,true);
do{// Discard our own input
prompt=readFullLineFromPtyProcess(&kadminProc);
prompt=readFullLineFromPtyProcess(&kinitProc);
printf("(kinit) '%s'\n",prompt.ascii());
}while(prompt=="");
prompt=prompt.stripWhiteSpace();
@ -2005,6 +2002,48 @@ int LDAPManager::kAdminAddNewPrincipal(TQString principalName, TQString newPassw
if(errstr)*errstr=i18n("%1<p>Details:<br>Failed to execute krb5_parse_name for principal '%2' (code %3)").arg(krb5_get_error_message(m_krb5admContext,krb5adm_ret)).arg(principalName).arg(krb5adm_ret);
if(errstr)*errstr=i18n("%1<p>Details:<br>Failed to execute kadm5_delete_principal for principal '%2' (code %3)").arg(krb5_get_error_message(m_krb5admContext,krb5adm_ret)).arg(principalName).arg(krb5adm_ret);
if(errstr)*errstr=i18n("%1<p>Details:<br>Failed to open keytab file '%2' (code %3)").arg(krb5_get_error_message(m_krb5admContext,krb5adm_ret)).arg(fileName).arg(krb5adm_ret);