Группа :: Система/Библиотеки
Пакет: kf5-kdesu
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: alt-fix-su-to-different-non-root-user.patch
Скачать
Скачать
diff --git a/kdesu/src/suprocess.cpp b/kdesu/src/suprocess.cpp
index 0e653f1..3413bfd 100644
--- a/kdesu/src/suprocess.cpp
+++ b/kdesu/src/suprocess.cpp
@@ -103,6 +103,9 @@ int SuProcess::exec(const char *password, int check)
}
QList<QByteArray> args;
+ if (d->superUserCommand == QLatin1String("su")) {
+ args += "-l"; // krazy:exclude=doublequote_chars (QList, not QString)
+ }
if (d->superUserCommand == QLatin1String("sudo")) {
args += "-u";
}
@@ -122,7 +125,6 @@ int SuProcess::exec(const char *password, int check)
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();