Group :: System/Libraries
RPM: kf5-kdesu
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: alt-fix-su-to-different-non-root-user.patch
Download
Download
--- a/kdesu/src/suprocess.cpp
+++ b/kdesu/src/suprocess.cpp
@@ -111,6 +111,10 @@ int SuProcess::exec(const char *password
}
QList<QByteArray> args;
+ if (d->superUserCommand == QLatin1String("su")) {
+ args += "-l"; // krazy:exclude=doublequote_chars (QList, not QString)
+ }
+
if (d->isPrivilegeEscalation()) {
args += "-u";
}
@@ -130,7 +134,6 @@ int SuProcess::exec(const char *password
const QString defaultPath = QStringLiteral(CMAKE_INSTALL_FULL_LIBEXECDIR_KF5) + QStringLiteral("/kdesu_stub");
const QString kdesuStubPath = group.readEntry("kdesu_stub_path", defaultPath);
args += kdesuStubPath.toLocal8Bit();
- args += "-"; // krazy:exclude=doublequote_chars (QList, not QString)
const QString commandString = group.readEntry("command", QStandardPaths::findExecutable(d->superUserCommand));
const QByteArray command = commandString.toLocal8Bit();