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

Update Librewolf profile and Add Sway profile #4164

Merged
merged 24 commits into from
Apr 19, 2021
Merged

Update Librewolf profile and Add Sway profile #4164

merged 24 commits into from
Apr 19, 2021

Conversation

vnepogodin
Copy link
Contributor

Parent is shutting down then including firefox-common-addons.profile
error.log

Not working then including firefox-common-addons.profile
@vnepogodin vnepogodin changed the title Crash Librewolf Crash Librewolf and Add Sway profile Apr 4, 2021
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.

LGTM, some suggestions below.

Should we make sway redirect to i3?

etc/profile-a-l/librewolf.profile Show resolved Hide resolved
etc/profile-a-l/sway.profile Show resolved Hide resolved
@ghost
Copy link

ghost commented Apr 4, 2021

LGTM, some suggestions below.

Should we make sway redirect to i3?

Sway is almost i3 the .config are also same the main diif is wayland and x11 but why need to redirect to i3. I think sway profile will also be cool. if not working then we can redirect to i3 for sure 👍

@rusty-snake
Copy link
Collaborator

Sway is almost i3

That's the reason.

@glitsj16
Copy link
Collaborator

glitsj16 commented Apr 4, 2021

@rusty-snake I agree it would make sense to implement sway as a redirect profile. Perhaps the term 'redirect' caused confusion in this context for other posters.

Sway is almost i3 the .config are also same the main diif is wayland and x11 but why need to redirect to i3. I think sway profile will also be cool. if not working then we can redirect to i3 for sure

@BL4CKH47H4CK3R I think there's some confusion here. The 'redirect' relates to how we use one main profile for common options that are shared among several applications. It does not impact the way sway will work, it only affects the way we write firejail profiles to avoid doing the same stuff all over again.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

@glitsj16, I know that desktop environment or windows manager doesn't matter when I am using firejail. But I see people are creating profile like for i3 which is redundant so I told. Even archiso is enough to run firejail 😄

etc/profile-a-l/librewolf.profile Show resolved Hide resolved
so..
`No its not needed as it reveals lots of important /usr/share folders like /usr/share/fonts which can used for font fingerprinting and OS detection. Like the site or attacker will know that which font you are using. Linux and windows common font are not same so its a problem. Besides there are so many other important folders as I see. Librewolf can launch and work perfectly without this options`
@vnepogodin vnepogodin changed the title Crash Librewolf and Add Sway profile Update Librewolf profile and Add Sway profile Apr 4, 2021
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.

Re-add include whitelist-usr-share-common.inc.

@vnepogodin
Copy link
Contributor Author

Re-add include whitelist-usr-share-common.inc.

Why ?

@rusty-snake
Copy link
Collaborator

TL;DR: It whitelist lots of important /usr/share folders.
Always use include {allow,whitelist}-common.inc in PRs.

The role of {allow,whitelist}-common.inc is to make maintaining profiles easier and cause less breakage. Always use them in PRs unless you can 100% guarantee that they are not required. The paths to some resources can differ between distros, others depend on the HW where it runs or the configuration. Or the version you run. Have you tested that it works on every major distro, with any configuration, any DE, any HW? It's not enough that it can start there. Can it play audio? Is HTTPS working? What about spellchecking? Just the first line (whitelist /usr/share/alsa) can you guarantee that not whitelisting /usr/share/alase does not break sound? With raw alsa?

@vnepogodin
Copy link
Contributor Author

TL;DR: It whitelist lots of important /usr/share folders.

Always use include {allow,whitelist}-common.inc in PRs.

The role of {allow,whitelist}-common.inc is to make maintaining profiles easier and cause less breakage. Always use them in PRs unless you can 100% guarantee that they are not required. The paths to some resources can differ between distros, others depend on the HW where it runs or the configuration. Or the version you run. Have you tested that it works on every major distro, with any configuration, any DE, any HW? It's not enough that it can start there. Can it play audio? Is HTTPS working? What about spellchecking? Just the first line (whitelist /usr/share/alsa) can you guarantee that not whitelisting /usr/share/alase does not break sound? With raw alsa?

I agree but how about ?

#4164 (comment)

@rusty-snake
Copy link
Collaborator

(Privacy is out of the scope of firejail, it's for security).

its not needed as it reveals lots of important /usr/share folders

It's not needed because it reveals important folders???!

like /usr/share/fonts which can used for font fingerprinting

This does not prevent font fingerprinting. Actually it makes the situation worse. If you whitelist /usr/share/fonts and don't install to much other fonts you have the same font FP as any other user of your distro. If you omit it and put on a gas mask you're even more unique.

and OS detection

Your OS can be detected anyway.

  • Linux has an other TCP/IP-Stack then Window => Passive detection possible.
  • Some math operations on floating point number has other results on Linux then Window. => Active detection via JavaScript
  • Your scrollbar-width depends on your GTK-Theme and version => Active detection via JS or CSS possible.
  • Your HTTP-UA contains your OS.
  • Your JS-UA contains your OS, even with RFP.
  • ...

Linux and windows common font are not same so its a problem.

Masking your fonts still does not make them the same.

Librewolf can launch

yes

work perfectly without this options

no (I'm 90% sure it can not open HTTPS on some system without wusc)

@rusty-snake
Copy link
Collaborator

BTW I don't think whitelist /usr/share/gnome-shell/search-providers/firefox-search-provider.ini (firefox-search-provider) is used.

Revert `include whitelist-usr-share-common.inc`
Sync with Firefox profile
# librewolf requires a shell to launch on Arch. We can possibly remove sh though.
#private-bin bash,dbus-launch,dbus-send,env,librewolf,python*,sh,which
# librewolf requires a shell to launch on Arch.
#private-bin bash,dbus-launch,dbus-send,env,librewolf,sh,which
Copy link
Collaborator

Choose a reason for hiding this comment

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

Based on https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=librewolf#n325 it's just private-bin librewolf,sh if anyone want to test ...

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

This PR has a a merge conflict, please rebase.

@rusty-snake rusty-snake mentioned this pull request Apr 14, 2021
# librewolf requires a shell to launch on Arch. We can possibly remove sh though.
# Add the next line to your librewolf.local to enable private-bin.
#private-bin bash,dbus-launch,dbus-send,env,librewolf,python*,sh,which
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
#private-bin bash,dbus-launch,dbus-send,env,librewolf,python*,sh,which
#private-bin bash,dbus-launch,dbus-send,env,librewolf,sh,which

Copy link
Contributor Author

@vnepogodin vnepogodin Apr 18, 2021

Choose a reason for hiding this comment

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

I've had added before but it can't merge changes
1d8c94c

btw tested

Copy link
Collaborator

Choose a reason for hiding this comment

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

After a rebase (unlike a merge of master) it should work w/o conflicting. Rebasing and squashing some of the commits makes sense anyway if you look at the history. So if you can do an interactive rebase.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done 😃

Not working then including firefox-common-addons.profile
so..
`No its not needed as it reveals lots of important /usr/share folders like /usr/share/fonts which can used for font fingerprinting and OS detection. Like the site or attacker will know that which font you are using. Linux and windows common font are not same so its a problem. Besides there are so many other important folders as I see. Librewolf can launch and work perfectly without this options`
Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
@rusty-snake rusty-snake merged commit 98ed471 into netblue30:master Apr 19, 2021
@rusty-snake
Copy link
Collaborator

merged, thanks!

@matu3ba matu3ba mentioned this pull request Oct 7, 2021
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.

3 participants