Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for KeePassXC plugin #3984

Merged
merged 3 commits into from
Mar 19, 2021
Merged

Fix for KeePassXC plugin #3984

merged 3 commits into from
Mar 19, 2021

Conversation

nidamanx
Copy link
Contributor

@nidamanx nidamanx commented Feb 13, 2021

KeePassXC changed the socket name.
keepassxreboot/keepassxc@a145bf9
Keep also old socket name in whitelist for back compatibility

KeePassXC changed the socket name.
keepassxreboot/keepassxc@a145bf9
Keep also old socket name in whitelist for back compatibility
Copy link
Collaborator

@rusty-snake rusty-snake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it is a whitelist, it shoud go to the whitelist block(s) above (line 12-23).

etc/profile-a-l/firefox.profile Outdated Show resolved Hide resolved
@rusty-snake
Copy link
Collaborator

Since it is a whitelist, it shoud go to the whitelist block(s) above (line 12-23).

and since it is a Add-On related thing, it should go in firefox-common-addons.inc. There we conflict with ignore include whitelist-runuser-common.inc (which I added because of KPXC).

@nidamanx
Copy link
Contributor Author

Since it is a whitelist, it shoud go to the whitelist block(s) above (line 12-23).

and since it is a Add-On related thing, it should go in firefox-common-addons.inc. There we conflict with ignore include whitelist-runuser-common.inc (which I added because of KPXC).

Genau! :-)
Let me do a full test before
Also commenting the line ignore include whitelist-runuser-common.inc

@nidamanx
Copy link
Contributor Author

nidamanx commented Feb 13, 2021

Since it is a whitelist, it shoud go to the whitelist block(s) above (line 12-23).

and since it is a Add-On related thing, it should go in firefox-common-addons.inc. There we conflict with ignore include whitelist-runuser-common.inc (which I added because of KPXC).

Very strange.
My setup (Default Debian) is ignoring firefox-common-addons.inc and firefox-common-addons.local
Starting firejail firefox from terminal, I cannot see parsing firefox-common-addons.*
And, it didn't work at all while setting up the lines for KPXC (and commenting the ones in firefox.local profile,
I tried in .config/firejail and in /etc/firejail in all combinations, but no way.
The only way, in my side, seems to be using firefox.local or firefox.profile

$ firejail firefox
Reading profile /etc/firejail/whitelist-usr-share-common.inc
Reading profile /etc/firejail/firefox-common.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-devel.inc
Reading profile /etc/firejail/disable-exec.inc
Reading profile /etc/firejail/disable-interpreters.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/whitelist-common.inc
Reading profile /etc/firejail/whitelist-runuser-common.inc
Reading profile /etc/firejail/whitelist-var-common.inc
Warning: networking feature is disabled in Firejail configuration file
Seccomp list in: !chroot, check list: @default-keep, prelist: unknown,
Parent pid 13835, child pid 13838
Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set.
Seccomp list in: !chroot, check list: @default-keep, prelist: unknown,
Child process initialized in 219.09 ms
$ ls -l /etc/firejail/firefox-common-addons*
-rw-r--r-- 1 root root 3203 feb 13 19:34 /etc/firejail/firefox-common-addons.inc
-rw-r--r-- 1 root root 3301 feb 13 19:23 /etc/firejail/firefox-common-addons.local

@rusty-snake
Copy link
Collaborator

Sorry, I don't fully get you. firefox-common-addons.inc is opt-in because it has wide relaxations and is used by a minority, if this is where you hang.

@nidamanx
Copy link
Contributor Author

Sorry, I don't fully get you. firefox-common-addons.inc is opt-in because it has wide relaxations and is used by a minority, if this is where you hang.

So, that's the reason why I cannot see the parse of firefox-common-addons.inc while starting from the terminal.
But, anyway, if I insert the lines about KPRC only in firefox-common-addons.inc or firefox-common-addons.local, I cannot have a fully working plugin.
It really seems I need to use this way:

$ ls -1 ~/.config/firejail/
firefox.local
firefox.profile
keepassxc.profile

P.S. firefox.profile and keepassxc.profile are there to override the default from .deb (so I'm sure to use the very last from the git)
And firefox.local contains just the few lines fos KPHC

@kmk3
Copy link
Collaborator

kmk3 commented Feb 14, 2021

(For cross-reference, this PR stems from the following issue: #3952)

@nidamanx
Copy link
Contributor Author

Tried again this morning without good results.
The only way seems really to follow 3952#issuecomment-778640094

For the test, I deleted firefox.local and used the updated version for all firefox.profiles,
No way (at least on Debian 10) to use /etc/firejail/firefox-common-addons.local
I tried the following lines in any combinations but really seems this .local file is ignored

ignore include whitelist-runuser-common.inc (commented/uncommented/ignored/included)
#private-bin keepassxc-proxy (commented/uncommented)
whitelist ${RUNUSER}/kpxc_server (never commented)

@nidamanx
Copy link
Contributor Author

What about this profile?
With the right socket seems going well and with no issues since 10 days

@rusty-snake
Copy link
Collaborator

My worry is that I don't understand why firefox-common-addons.inc doesn't work.

@nidamanx
Copy link
Contributor Author

why firefox-common-addons.inc doesn't work

Mhhh, clear.
So, better investigate more. Let me do some more tests

One question: is the new named bus from keepassxc already included somewhere? if not, why firefox-common-addons should allow it? ...maybe I'm missing something
I think the problem was only the new renamed bus. All the rest is still the same. Isn't that correct?

@netblue30
Copy link
Owner

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Firefox profiles break KeePassXC addon whitelist-runuser-common breaks KeePassXC browser plugin
4 participants