enable-tor: Use pkexec to run command as root when gksu and kdesu are not available.

gksu is no longer in debian, even stable

kdesu in debian is not installed in PATH any longer, though the executable
is still present under /usr/lib

pkexec is packagekit's replacement for those older commands.
This commit is contained in:
Joey Hess 2019-09-30 15:19:01 -04:00
parent f2737a5fbe
commit b90ddbc383
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 4 additions and 0 deletions

View file

@ -9,6 +9,8 @@ git-annex (7.20190913) UNRELEASED; urgency=medium
* adjust --lock: This enters an adjusted branch where files are locked.
* remotedaemon: Don't list --stop in help since it's not supported.
* enable-tor: Run kdesu with -c option.
* enable-tor: Use pkexec to run command as root when gksu and kdesu are not
available.
-- Joey Hess <id@joeyh.name> Thu, 19 Sep 2019 11:11:19 -0400

View file

@ -77,6 +77,8 @@ mkSuCommand cmd ps = firstM (\(SuCommand _ p _) -> inPath p) =<< selectcmds
[Param shellcmd]
, SuCommand (MayPromptPassword SomePassword) "kdesu"
[Param "-c", Param shellcmd]
, SuCommand (MayPromptPassword SomePassword) "pkexec"
([Param cmd] ++ ps)
-- Available in Debian's menu package; knows about lots of
-- ways to gain root.
, SuCommand (MayPromptPassword SomePassword) "su-to-root"