mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1471] firejail --noprofile allows gksu(do) but not pkexec #989
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#989
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Fred-Barclay on GitHub (Aug 16, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1471
I noticed this when trying to build a profile for a program that uses polkit for authentication control.
Running
pkexecnormally in terminal (not in firejail), I get the standard gui dialog.Switching to
firejail --noprofile, there is no dialog window, and the authentication attempt in the console fails:However, gksu still provides its standard dialog and allows privilege escalation:
(Strangely, bash seems to freeze at this point. But the privileges have definitely been elevated, as this output shows:)
This isn't ideal, IMHO. Some programs (like etcher) rely on pkexec, and we should probably support allowing privilege escalation with pkexec as well as gksu (though only super-loose sandboxes like
firejail --noprofile, of course. 😄)Cheers!
@icasdri commented on GitHub (Aug 16, 2017):
It sounds like
gksudoesn't depend on DBus whereaspkexecdoes.firejail --noprofilelikely blocks access to the system DBus socket. A new network namespace might also do it.@Fred-Barclay commented on GitHub (Aug 16, 2017):
Interestingly, I get a different error when allowing dbus access:
So it looks like it does need at least some access to dbus.
@Ferroin commented on GitHub (Aug 16, 2017):
Yes, pkexec needs DBus access. It uses PolicyKit, which is a DBus-only service that someone thought was somehow a better idea than sudo when dealing with command execution (it's great for rights delegation when dealing with DBus services, because there really isn't any other option, but it's overkill for regular command execution). On the other hand, gksu is just a graphical frontend for sudo, so it just needs access to X11 to work.
@netblue30 commented on GitHub (Aug 18, 2017):
In my case (Debian stretch), running "pkexec ls /root" in a "firejail --noprofile" crashes. I get this in syslog:
@chiraag-nataraj commented on GitHub (Jul 15, 2018):
lol PolicyKit is a mess and is half-broken on my end even without using
firejail(although maybe it's because ofhidepidin my case...). It uses a security-hole-ridden mess called DBus and is somehow supposed to be better than sudo. Ugh.@chiraag-nataraj commented on GitHub (Aug 20, 2018):
When I run it, I get the following:
By the way,
gksuandgksudohave been removed entirely (at least from Debian and Ubuntu, and probably other Debian derivatives as well), and apparently the recommended way is to usepkexecnow, which currently doesn't work withinfirejail. I suspect it's due to the PID namespace...@mulecat commented on GitHub (Dec 26, 2018):
Any update on this?
pkexecnot working withfirejailthere's no way to run applications that require it, such as GameHub.@rusty-snake commented on GitHub (Dec 26, 2018):
Also on Fedora systems with F29+RPMFusion there is no
gksu,gksudo,kdesudo.@rradar commented on GitHub (May 8, 2019):
just saw that etcher is stated in this issue by @Fred-Barclay
I'm trying to stop etcher from doing calls to networks/internet but I'm not able to get it running properly with firejail (the gui doesn't load properly). Here is my etcher issue witch a screenshot: https://github.com/balena-io/etcher/issues/2772
@chiraag-nataraj commented on GitHub (May 20, 2019):
Based on @rradar's comment, I presume this still an issue with
pkexecand we should figure out what to do about it.@rusty-snake commented on GitHub (Nov 25, 2019):
8204822861@rusty-snake commented on GitHub (Apr 1, 2020):
@odkr commented on GitHub (Jul 21, 2021):
Is this still unresolved or is it just me?
I’m not a fan of polkit either, but it seems that it is here to stay and it would be useful if it could be called from within a firejail.