diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-12 00:05:47 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-12 00:05:47 -0600 |
commit | e131f10b84dbec07ad49d36c192777a72189a39e (patch) | |
tree | b577d8c3eb50796f697b25302e3f2b2f0ea8f236 /tdesu/stub.cpp | |
parent | f9f99fa1329c6e28ad1d9ab37876f9b72ea04529 (diff) | |
download | tdelibs-e131f10b84dbec07ad49d36c192777a72189a39e.tar.gz tdelibs-e131f10b84dbec07ad49d36c192777a72189a39e.zip |
Fix tdesu internal pathing
This closes Bug 766
Diffstat (limited to 'tdesu/stub.cpp')
-rw-r--r-- | tdesu/stub.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tdesu/stub.cpp b/tdesu/stub.cpp index 7f083d71b..5b222f51e 100644 --- a/tdesu/stub.cpp +++ b/tdesu/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); |