summaryrefslogtreecommitdiffstats
path: root/konsole/konsole
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-11-21 01:09:59 +0100
committerSlávek Banko <slavek.banko@axis.cz>2013-11-21 01:11:11 +0100
commit7d6186b592682b2a14c39b40a071f77d29fc8c7a (patch)
treeefa047163fc16d5b526d4485b7ba0a1fe831c8a7 /konsole/konsole
parent266a2501dfc0b0c22b861bbb63db5be6ae0dd21a (diff)
downloadtdebase-7d6186b592682b2a14c39b40a071f77d29fc8c7a.tar.gz
tdebase-7d6186b592682b2a14c39b40a071f77d29fc8c7a.zip
Fix konsole super user sessions with sudo or su
This resolves Bug 853
Diffstat (limited to 'konsole/konsole')
-rw-r--r--konsole/konsole/konsole.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/konsole/konsole/konsole.cpp b/konsole/konsole/konsole.cpp
index ef3079654..b76a5c4b1 100644
--- a/konsole/konsole/konsole.cpp
+++ b/konsole/konsole/konsole.cpp
@@ -3421,9 +3421,7 @@ void Konsole::addSessionCommand(const TQString &path)
// try to locate the binary
TQString exec= co->readPathEntry("Exec");
- if (exec.startsWith("sudo su -c \'")) {
- exec = exec.mid(12,exec.length()-13);
- }
+ exec.remove(TQRegExp("^(sudo )?su (- )?-c ?\'"));
exec = KRun::binaryName(exec, false);
exec = KShell::tildeExpand(exec);