diff options
author | Rainer Keller <rainer.keller@theqtcompany.com> | 2014-11-26 15:31:55 +0100 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@theqtcompany.com> | 2014-11-26 16:43:17 +0200 |
commit | c41df10cd7b47abfd1c2cc8d959422497f635bcb (patch) | |
tree | fee00dbf6d4ec2179597e2b6a77f4750f6b9faec /src | |
parent | 37d9e07281d4c51fe41d3625429ce4806a5c45b2 (diff) |
b2qt-flashing-wizard: Use pkexec to gain root rights
Change-Id: Iecc7b90b4b37b81800aa8858531a8e284360d8a4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/b2qt-flashing-wizard/elevator.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/b2qt-flashing-wizard/elevator.cpp b/src/b2qt-flashing-wizard/elevator.cpp index 4c47693..6264cc8 100644 --- a/src/b2qt-flashing-wizard/elevator.cpp +++ b/src/b2qt-flashing-wizard/elevator.cpp @@ -34,15 +34,9 @@ QStringList elevate() return rc; } - if (QFile::exists("/usr/bin/kdesu")) { - rc << "/usr/bin/kdesu" << "-u" << "root" << "-t" << "--noignorebutton" << "--"; // @ARGS - } else if (QFile::exists("/usr/bin/gksu")) { - rc << "/usr/bin/gksu" << "--sudo-mode" << "-u" << "root" << "--"; // @ARGS -// } else if (!QFile::exists("/usr/lib/ssh/x11-ssh-askpass")) { -// // SUDO_ASKPASS = @askpass-tool; -// qDebug() << "askpass"; -// rc << "sudo" << "-A" << "--"; // @ARGS - } + if (QFile::exists("/usr/bin/pkexec")) + rc << "/usr/bin/pkexec"; // @ARGS + return rc; } |