summaryrefslogtreecommitdiffstats
path: root/tdepasswd
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2018-11-28 23:51:20 +0900
committerMichele Calgaro <[email protected]>2018-11-28 23:51:20 +0900
commit6db0c5f228d12fc1a1ef861717d1dc4a3c9d6a6c (patch)
tree972d106294d740e92c586300da66d011bfe9d13e /tdepasswd
parent6ae10fc66ed3c35e98e49bac8bf6670f0a9e2d6b (diff)
downloadtdebase-6db0c5f228d12fc1a1ef861717d1dc4a3c9d6a6c.tar.gz
tdebase-6db0c5f228d12fc1a1ef861717d1dc4a3c9d6a6c.zip
Improved previous commit using local8Bit() in place of utf8() when a
password is transmitted over pipes to other processes. Signed-off-by: Michele Calgaro <[email protected]> Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'tdepasswd')
-rw-r--r--tdepasswd/kcm/main.cpp2
-rw-r--r--tdepasswd/passwd.cpp2
-rw-r--r--tdepasswd/passwddlg.cpp6
-rw-r--r--tdepasswd/tdepasswd.cpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/tdepasswd/kcm/main.cpp b/tdepasswd/kcm/main.cpp
index 9b11acbcd..0751c997e 100644
--- a/tdepasswd/kcm/main.cpp
+++ b/tdepasswd/kcm/main.cpp
@@ -221,7 +221,7 @@ void KCMUserAccount::save()
}
ChfnProcess *proc = new ChfnProcess();
- ret = proc->exec(password.utf8(), _mw->leRealname->text().utf8() );
+ ret = proc->exec(password.local8Bit(), _mw->leRealname->text().local8Bit() );
if ( ret )
{
if ( ret == ChfnProcess::PasswordError )
diff --git a/tdepasswd/passwd.cpp b/tdepasswd/passwd.cpp
index 6d6d45675..ab0e913a2 100644
--- a/tdepasswd/passwd.cpp
+++ b/tdepasswd/passwd.cpp
@@ -66,7 +66,7 @@ PasswdProcess::~PasswdProcess()
int PasswdProcess::checkCurrent(const TQString &oldpass)
{
- return exec(oldpass.utf8(), 0L, 1);
+ return exec(oldpass.local8Bit(), 0L, 1);
}
diff --git a/tdepasswd/passwddlg.cpp b/tdepasswd/passwddlg.cpp
index f58a29996..eb897dc95 100644
--- a/tdepasswd/passwddlg.cpp
+++ b/tdepasswd/passwddlg.cpp
@@ -88,7 +88,7 @@ TDEpasswd2Dialog::TDEpasswd2Dialog(const TQString &oldpass, const TQString &user
if (m_User.isEmpty())
setPrompt(i18n("Please enter your new password:"));
else
- setPrompt(i18n("Please enter the new password for user <b>%1</b>:").arg(m_User.utf8().data()));
+ setPrompt(i18n("Please enter the new password for user <b>%1</b>:").arg(m_User.local8Bit().data()));
}
@@ -99,7 +99,7 @@ TDEpasswd2Dialog::~TDEpasswd2Dialog()
bool TDEpasswd2Dialog::checkPassword(const TQString &password)
{
- PasswdProcess proc(m_User.utf8());
+ PasswdProcess proc(m_User.local8Bit());
TQString edit_password = password;
if (edit_password.length() > 8)
@@ -127,7 +127,7 @@ bool TDEpasswd2Dialog::checkPassword(const TQString &password)
}
}
- int ret = proc.exec(m_Pass.utf8(), edit_password.utf8());
+ int ret = proc.exec(m_Pass.local8Bit(), edit_password.local8Bit());
switch (ret)
{
case 0:
diff --git a/tdepasswd/tdepasswd.cpp b/tdepasswd/tdepasswd.cpp
index 41567bf28..a6015eacc 100644
--- a/tdepasswd/tdepasswd.cpp
+++ b/tdepasswd/tdepasswd.cpp
@@ -52,7 +52,7 @@ int main(int argc, char **argv)
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if (args->count())
- user = TQString(args->arg(0));
+ user = TQString::fromLocal8Bit(args->arg(0));
/* You must be able to run "tdepasswd loginName" */
if ( !user.isEmpty() && user!=KUser().loginName() && !bRoot)