diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-12 00:05:47 -0600 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2012-06-02 19:05:14 +0200 |
commit | 73036b1ca2d49e5f5fcef8979bbb3ec39d10c17e (patch) | |
tree | 0e2038bc3ac9c73f3df179bed4db0bdfbade337f /kdesu | |
parent | c319ffd92918f43a2bf21a531b7d523bdc064cf4 (diff) | |
download | tdelibs-73036b1ca2d49e5f5fcef8979bbb3ec39d10c17e.tar.gz tdelibs-73036b1ca2d49e5f5fcef8979bbb3ec39d10c17e.zip |
Fix kdesu internal pathing
This closes Bug 766
(cherry picked from commit e131f10b84dbec07ad49d36c192777a72189a39e)
Diffstat (limited to 'kdesu')
-rw-r--r-- | kdesu/stub.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/kdesu/stub.cpp b/kdesu/stub.cpp index 2af171d72..044e807a4 100644 --- a/kdesu/stub.cpp +++ b/kdesu/stub.cpp @@ -121,11 +121,16 @@ int StubProcess::ConverseStub(int check) TQCString path = getenv("PATH"); if (!path.isEmpty() && path[0] == ':') path = path.mid(1); - if (m_User == "root") - if (!path.isEmpty()) - path = "/sbin:/bin:/usr/sbin:/usr/bin:" + path; - else - path = "/sbin:/bin:/usr/sbin:/usr/bin"; + if (m_User == "root") + if (!path.isEmpty()) + path = "/usr/local/sbin:/usr/sbin:/sbin:" + path; + else + if (strcmp(__KDE_BINDIR, "/usr/bin") == 0) { + path = "/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin"; + } + else { + path = "/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:" __KDE_BINDIR ":/usr/bin:/bin"; + } writeLine(path); } else if (line == "user") { writeLine(m_User); |