|
|
|
@ -978,12 +978,20 @@ int LDAPManager::setPasswordForUser(LDAPUserInfo user, TQString *errstr) {
|
|
|
|
|
}
|
|
|
|
|
if (prompt.endsWith(" Password:")) {
|
|
|
|
|
if (admincreds.password == "") {
|
|
|
|
|
if (tqApp->type() != TQApplication::Tty) {
|
|
|
|
|
TQCString password;
|
|
|
|
|
int result = KPasswordDialog::getPassword(password, prompt);
|
|
|
|
|
if (result == KPasswordDialog::Accepted) {
|
|
|
|
|
admincreds.password = password;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
TQFile file;
|
|
|
|
|
file.open(IO_ReadOnly, stdin);
|
|
|
|
|
TQTextStream qtin(&file);
|
|
|
|
|
admincreds.password = qtin.readLine();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (admincreds.password != "") {
|
|
|
|
|
kadminProc.enableLocalEcho(false);
|
|
|
|
|
kadminProc.writeLine(admincreds.password, true);
|
|
|
|
@ -1633,12 +1641,20 @@ int LDAPManager::addServiceInfo(LDAPServiceInfo service, TQString *errstr) {
|
|
|
|
|
while (prompt != "kadmin>") {
|
|
|
|
|
if (prompt.endsWith(" Password:")) {
|
|
|
|
|
if (admincreds.password == "") {
|
|
|
|
|
if (tqApp->type() != TQApplication::Tty) {
|
|
|
|
|
TQCString password;
|
|
|
|
|
int result = KPasswordDialog::getPassword(password, prompt);
|
|
|
|
|
if (result == KPasswordDialog::Accepted) {
|
|
|
|
|
admincreds.password = password;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
TQFile file;
|
|
|
|
|
file.open(IO_ReadOnly, stdin);
|
|
|
|
|
TQTextStream qtin(&file);
|
|
|
|
|
admincreds.password = qtin.readLine();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (admincreds.password != "") {
|
|
|
|
|
kadminProc.enableLocalEcho(false);
|
|
|
|
|
kadminProc.writeLine(admincreds.password, true);
|
|
|
|
|