From 19e817b21a906ef14dc9df8dfa913dbe576215bb Mon Sep 17 00:00:00 2001 From: Darrell Anderson Date: Mon, 6 May 2013 20:09:44 -0500 Subject: Cleanup output clutter. --- src/ldapcontroller.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/ldapcontroller.cpp b/src/ldapcontroller.cpp index 0424bcc..5a153b1 100644 --- a/src/ldapcontroller.cpp +++ b/src/ldapcontroller.cpp @@ -147,13 +147,13 @@ LDAPController::~LDAPController() { void system_safe(const char * cmdstr) { if (system(cmdstr) < 0) { - printf("[ERROR] System call to '%s' failed!\n\r", cmdstr); + printf("[ERROR] System call to '%s' failed!\n", cmdstr); } } void chown_safe(const char * file, uid_t user, gid_t group) { if (chown(file, user, group) < 0) { - printf("[ERROR] Chown call to '%s' for %d:%d failed!\n\r", file, user, group); + printf("[ERROR] Chown call to '%s' for %d:%d failed!\n", file, user, group); } } @@ -785,13 +785,13 @@ void replacePlaceholdersInFile(TQString infile, TQString outfile, LDAPRealmConfi } else { //KMessageBox::error(0, i18n("Unable to open output schema file %1 for writing").arg(outfile), i18n("Internal Failure")); - printf("[INTERNAL FAILURE] Unable to open output schema file %s for writing\n\r", outfile.ascii()); fflush(stdout); + printf("[INTERNAL FAILURE] Unable to open output schema file %s for writing\n", outfile.ascii()); fflush(stdout); } ifile.close(); } else { //KMessageBox::error(0, i18n("Unable to open template schema file %1").arg(infile), i18n("Internal Failure")); - printf("[INTERNAL FAILURE] Unable to open template schema file %s\n\r", infile.ascii()); fflush(stdout); + printf("[INTERNAL FAILURE] Unable to open template schema file %s\n", infile.ascii()); fflush(stdout); } // Keep UI responsive @@ -919,7 +919,7 @@ int LDAPController::initializeNewKerberosRealm(TQString realmName, TQString *err kadminProc.writeLine(command, true); do { // Discard our own input prompt = LDAPManager::readFullLineFromPtyProcess(&kadminProc); - printf("(kadmin) '%s'\n\r", prompt.ascii()); + printf("(kadmin) '%s'\n", prompt.ascii()); } while (prompt == TQString(command)); prompt = prompt.stripWhiteSpace(); if (prompt.contains("authentication failed")) { @@ -934,7 +934,7 @@ int LDAPController::initializeNewKerberosRealm(TQString realmName, TQString *err kadminProc.writeLine(command, true); do { // Discard our own input prompt = LDAPManager::readFullLineFromPtyProcess(&kadminProc); - printf("(kadmin) '%s'\n\r", prompt.ascii()); + printf("(kadmin) '%s'\n", prompt.ascii()); } while (prompt == TQString(command)); prompt = prompt.stripWhiteSpace(); if (prompt.startsWith("Realm max")) { @@ -943,7 +943,7 @@ int LDAPController::initializeNewKerberosRealm(TQString realmName, TQString *err kadminProc.writeLine(command, true); do { // Discard our own input prompt = LDAPManager::readFullLineFromPtyProcess(&kadminProc); - printf("(kadmin) '%s'\n\r", prompt.ascii()); + printf("(kadmin) '%s'\n", prompt.ascii()); } while (prompt == TQString(command)); prompt = prompt.stripWhiteSpace(); } @@ -989,7 +989,7 @@ int LDAPController::addHostEntryToKerberosRealm(TQString kerberosHost, TQString kadminProc.writeLine(command, true); do { // Discard our own input prompt = LDAPManager::readFullLineFromPtyProcess(&kadminProc); - printf("(kadmin) '%s'\n\r", prompt.ascii()); + printf("(kadmin) '%s'\n", prompt.ascii()); } while (prompt == TQString(command)); prompt = prompt.stripWhiteSpace(); if (prompt.contains("authentication failed")) { @@ -1012,7 +1012,7 @@ int LDAPController::addHostEntryToKerberosRealm(TQString kerberosHost, TQString kadminProc.writeLine(command, true); do { // Discard our own input prompt = LDAPManager::readFullLineFromPtyProcess(&kadminProc); - printf("(kadmin) '%s'\n\r", prompt.ascii()); + printf("(kadmin) '%s'\n", prompt.ascii()); } while (prompt == TQString(command)); prompt = prompt.stripWhiteSpace(); // Use all defaults @@ -1037,7 +1037,7 @@ int LDAPController::addHostEntryToKerberosRealm(TQString kerberosHost, TQString kadminProc.writeLine(command, true); do { // Discard our own input prompt = LDAPManager::readFullLineFromPtyProcess(&kadminProc); - printf("(kadmin) '%s'\n\r", prompt.ascii()); + printf("(kadmin) '%s'\n", prompt.ascii()); } while (prompt == TQString(command)); prompt = prompt.stripWhiteSpace(); } @@ -1047,7 +1047,7 @@ int LDAPController::addHostEntryToKerberosRealm(TQString kerberosHost, TQString kadminProc.writeLine(command, true); do { // Discard our own input prompt = LDAPManager::readFullLineFromPtyProcess(&kadminProc); - printf("(kadmin) '%s'\n\r", prompt.ascii()); + printf("(kadmin) '%s'\n", prompt.ascii()); } while (prompt == TQString(command)); prompt = prompt.stripWhiteSpace(); if (prompt != "kadmin>") { @@ -1098,7 +1098,7 @@ int LDAPController::addLDAPEntryToKerberosRealm(TQString ldapProcessOwnerName, T kadminProc.writeLine(command, true); do { // Discard our own input prompt = LDAPManager::readFullLineFromPtyProcess(&kadminProc); - printf("(kadmin) '%s'\n\r", prompt.ascii()); + printf("(kadmin) '%s'\n", prompt.ascii()); } while (prompt.startsWith("ext --keytab=")); prompt = prompt.stripWhiteSpace(); if (prompt.contains("authentication failed")) { @@ -1121,7 +1121,7 @@ int LDAPController::addLDAPEntryToKerberosRealm(TQString ldapProcessOwnerName, T kadminProc.writeLine(command, true); do { // Discard our own input prompt = LDAPManager::readFullLineFromPtyProcess(&kadminProc); - printf("(kadmin) '%s'\n\r", prompt.ascii()); + printf("(kadmin) '%s'\n", prompt.ascii()); } while (prompt == TQString(command)); prompt = prompt.stripWhiteSpace(); // Use all defaults @@ -1146,7 +1146,7 @@ int LDAPController::addLDAPEntryToKerberosRealm(TQString ldapProcessOwnerName, T kadminProc.writeLine(command, true); do { // Discard our own input prompt = LDAPManager::readFullLineFromPtyProcess(&kadminProc); - printf("(kadmin) '%s'\n\r", prompt.ascii()); + printf("(kadmin) '%s'\n", prompt.ascii()); } while (prompt == TQString(command)); prompt = prompt.stripWhiteSpace(); } @@ -1156,7 +1156,7 @@ int LDAPController::addLDAPEntryToKerberosRealm(TQString ldapProcessOwnerName, T kadminProc.writeLine(command, true); do { // Discard our own input prompt = LDAPManager::readFullLineFromPtyProcess(&kadminProc); - printf("(kadmin) '%s'\n\r", prompt.ascii()); + printf("(kadmin) '%s'\n", prompt.ascii()); } while (prompt.startsWith("ext --keytab=")); prompt = prompt.stripWhiteSpace(); if (prompt != "kadmin>") { @@ -1209,7 +1209,7 @@ int LDAPController::setKerberosPasswordForUser(LDAPCredentials user, TQString *e kadminProc.writeLine(command, true); do { // Discard our own input prompt = LDAPManager::readFullLineFromPtyProcess(&kadminProc); - printf("(kadmin) '%s'\n\r", prompt.ascii()); + printf("(kadmin) '%s'\n", prompt.ascii()); } while (prompt == TQString(command)); prompt = prompt.stripWhiteSpace(); if (prompt.contains("authentication failed")) { @@ -1223,7 +1223,7 @@ int LDAPController::setKerberosPasswordForUser(LDAPCredentials user, TQString *e kadminProc.writeLine(user.password, true); do { // Discard our own input prompt = LDAPManager::readFullLineFromPtyProcess(&kadminProc); - printf("(kadmin) '%s'\n\r", prompt.ascii()); + printf("(kadmin) '%s'\n", prompt.ascii()); } while (prompt == ""); prompt = prompt.stripWhiteSpace(); if ((prompt.endsWith(" Password:")) && (prompt.startsWith("Verify"))) { @@ -1231,7 +1231,7 @@ int LDAPController::setKerberosPasswordForUser(LDAPCredentials user, TQString *e kadminProc.writeLine(user.password, true); do { // Discard our own input prompt = LDAPManager::readFullLineFromPtyProcess(&kadminProc); - printf("(kadmin) '%s'\n\r", prompt.ascii()); + printf("(kadmin) '%s'\n", prompt.ascii()); } while (prompt == ""); prompt = prompt.stripWhiteSpace(); } -- cgit v1.2.1