Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37045629
en ru br
Репозитории ALT

Группа :: Система/Библиотеки
Пакет: 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();
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin