diff options
Diffstat (limited to 'src/ldapcontroller.cpp')
-rw-r--r-- | src/ldapcontroller.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/ldapcontroller.cpp b/src/ldapcontroller.cpp index 7ed2a7e..e446060 100644 --- a/src/ldapcontroller.cpp +++ b/src/ldapcontroller.cpp @@ -322,8 +322,8 @@ void LDAPController::systemRoleChanged() { pdialog.setStatusMessage(i18n("Purging local configuration...")); tqApp->processEvents(); - system_safe(TQString("rm -f %1").arg(CRON_UPDATE_PRIMARY_REALM_CERTIFICATES_FILE)); - system_safe(TQString("rm -rf %1").arg(TDE_CERTIFICATE_DIR)); + system_safe(TQString("rm -f %1").arg(CRON_UPDATE_PRIMARY_REALM_CERTIFICATES_FILE).local8Bit()); + system_safe(TQString("rm -rf %1").arg(TDE_CERTIFICATE_DIR).local8Bit()); // Write the TDE realm configuration file LDAPRealmConfigList realms; @@ -731,7 +731,7 @@ void LDAPController::btnldapRegenerate() { // Get LDAP user uid/gid struct passwd *pwd; - pwd = getpwnam(m_ldapUserName); + pwd = getpwnam(m_ldapUserName.local8Bit()); slapd_uid = pwd->pw_uid; slapd_gid = pwd->pw_gid; @@ -829,7 +829,7 @@ void LDAPController::btnChangeLDAPRootPassword() { } } ifile.close(); - unlink(oldconfigfilename); + unlink(oldconfigfilename.local8Bit()); ofile.close(); if (controlLDAPServer(SC_START) == 0) { ret = true; @@ -1250,7 +1250,7 @@ int LDAPController::controlHeimdalServer(sc_command command, uid_t userid, gid_t } if (command == SC_PURGE) { controlHeimdalServer(SC_STOP); - system_safe("rm -f " + TQString(LDAP_KEYTAB_FILE)); + system_safe(TQString("rm -f %1").arg(LDAP_KEYTAB_FILE).local8Bit()); // FIXME // This assumes Debian system_safe("rm -f /etc/krb5.keytab"); @@ -1320,7 +1320,7 @@ int LDAPController::initializeNewKerberosRealm(TQString realmName, TQString *err prompt = LDAPManager::readFullLineFromPtyProcess(&kadminProc); prompt = prompt.stripWhiteSpace(); if (prompt == "kadmin>") { - command = TQCString("init "+realmName); + command = TQCString("init ")+realmName.local8Bit(); kadminProc.enableLocalEcho(false); kadminProc.writeLine(command, true); do { // Discard our own input @@ -1390,7 +1390,7 @@ int LDAPController::addHostEntryToKerberosRealm(TQString kerberosHost, TQString prompt = LDAPManager::readFullLineFromPtyProcess(&kadminProc); prompt = prompt.stripWhiteSpace(); if (prompt == "kadmin>") { - command = TQCString("ext "+hoststring); + command = TQCString("ext ")+hoststring.local8Bit(); kadminProc.enableLocalEcho(false); kadminProc.writeLine(command, true); do { // Discard our own input @@ -1413,7 +1413,7 @@ int LDAPController::addHostEntryToKerberosRealm(TQString kerberosHost, TQString kadminProc.writeLine("quit", true); return 1; } - command = TQCString("ank --random-key "+hoststring); + command = TQCString("ank --random-key ")+hoststring.local8Bit(); kadminProc.enableLocalEcho(false); kadminProc.writeLine(command, true); do { // Discard our own input @@ -1438,7 +1438,7 @@ int LDAPController::addHostEntryToKerberosRealm(TQString kerberosHost, TQString leftbracket++; defaultParam = prompt.mid(leftbracket, rightbracket-leftbracket); } - command = TQCString(defaultParam); + command = defaultParam.local8Bit(); kadminProc.enableLocalEcho(false); kadminProc.writeLine(command, true); do { // Discard our own input @@ -1448,7 +1448,7 @@ int LDAPController::addHostEntryToKerberosRealm(TQString kerberosHost, TQString prompt = prompt.stripWhiteSpace(); } } - command = TQCString("ext "+hoststring); + command = TQCString("ext ")+hoststring.local8Bit(); kadminProc.enableLocalEcho(false); kadminProc.writeLine(command, true); do { // Discard our own input @@ -1499,7 +1499,7 @@ int LDAPController::addLDAPEntryToKerberosRealm(TQString ldapProcessOwnerName, T prompt = LDAPManager::readFullLineFromPtyProcess(&kadminProc); prompt = prompt.stripWhiteSpace(); if (prompt == "kadmin>") { - command = TQCString("ext --keytab="+TQString(LDAP_KEYTAB_FILE)+" "+hoststring); + command = TQCString("ext --keytab=")+LDAP_KEYTAB_FILE+" "+hoststring.local8Bit(); kadminProc.enableLocalEcho(false); kadminProc.writeLine(command, true); do { // Discard our own input @@ -1522,7 +1522,7 @@ int LDAPController::addLDAPEntryToKerberosRealm(TQString ldapProcessOwnerName, T kadminProc.writeLine("quit", true); return 1; } - command = TQCString("ank --random-key "+hoststring); + command = TQCString("ank --random-key ")+hoststring.local8Bit(); kadminProc.enableLocalEcho(false); kadminProc.writeLine(command, true); do { // Discard our own input @@ -1547,7 +1547,7 @@ int LDAPController::addLDAPEntryToKerberosRealm(TQString ldapProcessOwnerName, T leftbracket++; defaultParam = prompt.mid(leftbracket, rightbracket-leftbracket); } - command = TQCString(defaultParam); + command = defaultParam.local8Bit(); kadminProc.enableLocalEcho(false); kadminProc.writeLine(command, true); do { // Discard our own input @@ -1557,7 +1557,7 @@ int LDAPController::addLDAPEntryToKerberosRealm(TQString ldapProcessOwnerName, T prompt = prompt.stripWhiteSpace(); } } - command = TQCString("ext --keytab="+TQString(LDAP_KEYTAB_FILE)+" "+hoststring); + command = TQCString("ext --keytab=")+LDAP_KEYTAB_FILE+" "+hoststring.local8Bit(); kadminProc.enableLocalEcho(false); kadminProc.writeLine(command, true); do { // Discard our own input @@ -1602,7 +1602,7 @@ int LDAPController::setKerberosPasswordForUser(LDAPCredentials user, TQString *e TQCString command = "kadmin"; QCStringList args; - args << TQCString("-l") << TQCString("-r") << TQCString(user.realm.upper()); + args << TQCString("-l") << TQCString("-r") << user.realm.upper().local8Bit(); TQString prompt; PtyProcess kadminProc; @@ -1610,7 +1610,7 @@ int LDAPController::setKerberosPasswordForUser(LDAPCredentials user, TQString *e prompt = LDAPManager::readFullLineFromPtyProcess(&kadminProc); prompt = prompt.stripWhiteSpace(); if (prompt == "kadmin>") { - command = TQCString("passwd "+user.username); + command = TQCString("passwd ")+user.username.local8Bit(); kadminProc.enableLocalEcho(false); kadminProc.writeLine(command, true); do { // Discard our own input @@ -1675,7 +1675,7 @@ int LDAPController::createRealmCertificates(LDAPCertConfig certinfo, LDAPRealmCo // Certificate authority certificate TQString command; command = TQString("openssl genrsa -out %1 %2").arg(KERBEROS_PKI_PEMKEY_FILE).arg(KEY_STRENGTH); - system_safe(command); + system_safe(command.local8Bit()); chmod(KERBEROS_PKI_PEMKEY_FILE, S_IRUSR|S_IWUSR); chown_safe(KERBEROS_PKI_PEMKEY_FILE, 0, 0); @@ -1689,7 +1689,7 @@ int LDAPController::createRealmCertificates(LDAPCertConfig certinfo, LDAPRealmCo kdc_keyfile.replace("@@@KDCSERVER@@@", realmconfig.name.lower()); kdc_reqfile.replace("@@@KDCSERVER@@@", realmconfig.name.lower()); command = TQString("openssl genrsa -out %1 %2").arg(kdc_keyfile).arg(KEY_STRENGTH); - system_safe(command); + system_safe(command.local8Bit()); chmod(kdc_keyfile.ascii(), S_IRUSR|S_IWUSR); chown_safe(kdc_keyfile.ascii(), 0, 0); @@ -1703,7 +1703,7 @@ int LDAPController::createRealmCertificates(LDAPCertConfig certinfo, LDAPRealmCo ldap_keyfile.replace("@@@ADMINSERVER@@@", realmconfig.name.lower()); ldap_reqfile.replace("@@@ADMINSERVER@@@", realmconfig.name.lower()); command = TQString("openssl genrsa -out %1 %2").arg(ldap_keyfile).arg(KEY_STRENGTH); - system_safe(command); + system_safe(command.local8Bit()); chmod(ldap_keyfile.ascii(), S_IRUSR|S_IWUSR); chown_safe(ldap_keyfile.ascii(), ldap_uid, ldap_gid); @@ -1913,7 +1913,7 @@ int LDAPController::createNewLDAPRealm(TQWidget* dialogparent, LDAPRealmConfig r // Get LDAP user uid/gid struct passwd *pwd; - pwd = getpwnam(m_ldapUserName); + pwd = getpwnam(m_ldapUserName.local8Bit()); slapd_uid = pwd->pw_uid; slapd_gid = pwd->pw_gid; @@ -1998,17 +1998,17 @@ int LDAPController::createNewLDAPRealm(TQWidget* dialogparent, LDAPRealmConfig r // There has GOT to be a better way to do this than system()!!! TQString command; command = TQString("cp %1 %2").arg(certinfo.provided_kerberos_pem).arg(KERBEROS_PKI_PEMKEY_FILE); - system_safe(command); + system_safe(command.local8Bit()); command = TQString("cp %1 %2").arg(certinfo.provided_kerberos_pemkey).arg(KERBEROS_PKI_PEM_FILE); - system_safe(command); + system_safe(command.local8Bit()); command = TQString("cp %1 %2").arg(certinfo.provided_kerberos_crt).arg(kdc_certfile); - system_safe(command); + system_safe(command.local8Bit()); command = TQString("cp %1 %2").arg(certinfo.provided_kerberos_key).arg(kdc_keyfile); - system_safe(command); + system_safe(command.local8Bit()); command = TQString("cp %1 %2").arg(certinfo.provided_ldap_crt).arg(ldap_certfile); - system_safe(command); + system_safe(command.local8Bit()); command = TQString("cp %1 %2").arg(certinfo.provided_ldap_key).arg(ldap_keyfile); - system_safe(command); + system_safe(command.local8Bit()); // Set permissions chmod(KERBEROS_PKI_PEMKEY_FILE, S_IRUSR|S_IWUSR); |