summaryrefslogtreecommitdiffstats
path: root/tdesu
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2018-11-28 23:51:20 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2018-11-28 23:51:20 +0900
commit6db0c5f228d12fc1a1ef861717d1dc4a3c9d6a6c (patch)
tree972d106294d740e92c586300da66d011bfe9d13e /tdesu
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 <michele.calgaro@yahoo.it> Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'tdesu')
-rw-r--r--tdesu/tdesu/sudlg.cpp2
-rw-r--r--tdesu/tdesu/tdesu.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/tdesu/tdesu/sudlg.cpp b/tdesu/tdesu/sudlg.cpp
index e17b3168..59ab64b0 100644
--- a/tdesu/tdesu/sudlg.cpp
+++ b/tdesu/tdesu/sudlg.cpp
@@ -71,7 +71,7 @@ bool TDEsuDialog::checkPassword(const TQString &password)
{
SuProcess proc;
proc.setUser(m_User);
- int status = proc.checkInstall(password.utf8());
+ int status = proc.checkInstall(password.local8Bit());
switch (status)
{
case -1:
diff --git a/tdesu/tdesu/tdesu.cpp b/tdesu/tdesu/tdesu.cpp
index 2849b4c6..f2635925 100644
--- a/tdesu/tdesu/tdesu.cpp
+++ b/tdesu/tdesu/tdesu.cpp
@@ -391,7 +391,7 @@ static int startApp()
}
else if (keep && have_daemon)
{
- client.setPass(password.utf8(), timeout);
+ client.setPass(password.local8Bit(), timeout);
client.setPriority(priority);
client.setScheduler(scheduler);
int result = client.exec(command, user, options, env);
@@ -415,7 +415,7 @@ static int startApp()
proc.setPriority(priority);
proc.setScheduler(scheduler);
proc.setCommand(command);
- int result = proc.exec(password.utf8());
+ int result = proc.exec(password.local8Bit());
return result;
}
return -1;