summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-01 19:28:30 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-01 19:28:30 +0000
commit92363401919186f2c45c145755081c2bf879bcd1 (patch)
treed100457ec21cc90d63fb0870639acd13fcfe9843
parentf2b438647d28fb2cf21f12dd31139295ccafc089 (diff)
downloadtdesudo-92363401.tar.gz
tdesudo-92363401.zip
Do not change home directory when using kdesudo
This improves system responsiveness and brings the actual behaviour more in line with what is expected git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdesudo@1250814 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--kdesudo/kdesudo.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/kdesudo/kdesudo.cpp b/kdesudo/kdesudo.cpp
index 41209be..bfeee46 100644
--- a/kdesudo/kdesudo.cpp
+++ b/kdesudo/kdesudo.cpp
@@ -59,6 +59,7 @@ KdeSudo::KdeSudo(TQWidget *parent, const char *name,const TQString& icon, const
bool realtime = args->isSet("r");
bool priority = args->isSet("p");
bool showCommand = (!args->isSet("d"));
+ bool keepCurrentHome = true;
bool changeUID = true;
bool noExec = false;
keepPwd = (!args->isSet("n"));
@@ -219,7 +220,12 @@ KdeSudo::KdeSudo(TQWidget *parent, const char *name,const TQString& icon, const
{
if (changeUID)
{
- *p << "sudo" << "-H" << "-S" << "-p" << "passprompt";
+ *p << "sudo";
+
+ if (!keepCurrentHome)
+ *p << "-H";
+
+ *p << "-S" << "-p" << "passprompt";
if (!runas.isEmpty())
*p << "-u" << runas;