mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #4995] problems with sylpheed #2848
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#2848
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 @Rosika2 on GitHub (Mar 1, 2022).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4995
Hi all,
I´ve got a dedicated work-directory which I want the e-mail-client
sylpheedto use with the option--private=[PATH to the DIR].This directory is located on my system on: /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/kgw_work3_sylpheed/ .
Strangely it seems to work just with the "--noprofile" option:
As an example I cd-ed into the respective directory and then issued the command
firejail --noprofile --private=(pwd) sylpheedwhich works well.
firejail --private=(pwd) sylpheedhowever won´t even open sylpheed´s GUI and shuts down the sandbox immediately:
Does anyone know why that might be?
Thanks a lot in advance
Many greetings
Rosika
P.S.:
my system: Linux/Lubuntu 20.04.4 LTS; 64 bit
kernel: 5.4.0-100-generic
firejail version: 0.9.68
@ghost commented on GitHub (Mar 1, 2022):
Please beware that --noprofile offers NO SECURITY whatsoever and is a debugging tool. When things work using that option, there isn't much of a mystery or strangeness involved. At least not when you realize that
--noprofileusesdefault.profilebehind the scenes. The latter doesn't have anyprivate-etcdefined, which is important in this context because /var/lib/dbus/machine-id usually is a symlink to /etc/machine-id.Our sylpheed.profile includes email-common.profile, and that does define a private-etc but machine-id is not part of it. And that explains the D-Bus output you're seeing. Try adding
--private-etc=machine-idon command line or use a ~/.config/firejail/sylpheed.local withprivate-etc machine-id.On a side-note I want to ask you something. We don't see that many sylpheed users on our issue tracker. I use claws-mail myself, which is related to sylpheed. And that never seems to need access to /etc/machine-id. So I'm wondering if you could confirm it your sylpheed does when you run it 'regularly', meaning aside from this specific use-case you want to implement. We might need to fix that in our sylpheed.profile so you don't need anything special in the future.
@Rosika2 commented on GitHub (Mar 1, 2022):
@glitsj16:
Hi and thank you so much for your very fast and detailed reply.
O.k., I think I knew that already. Still it´s good of you to point it out. I was providing that command just to show that sylpheed works by itself.
You´re right. My wording was a bit unfortunate. Sorry.
Yes, you´re right. I checked it. Of course I believed you right away; but I always want to learn something new. Therefore my checking. :)
In
email-common.profileI found the lineprivate-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gcrypt,gnupg,groups,gtk-2.0,gtk-3.0,hostname,hosts,hosts.conf,ld.so.cache,ld.so.preload,mailname,nsswitch.conf,passwd,pki,resolv.conf,selinux,ssl,xdgAm I right in assuming that anything following "private-etc" are the items which define what´s in it? I´m asking because of the syntax. After "private-etc" there´s just a whitespace and all the other items follow (however they´re separated by commas).
So actually there´s no entry named "machine-id", like you pointed out.
You suggestion works well:
firejail --private-etc=machine-id --private=/media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/kgw_work3_sylpheed sylpheedworks perfectly. Thanks a lot. :)
Thanks for your reference to claws-mail.
Interesting.
Hmm, I´m a bit confused here.
Do you mean I can confiirm it needs acces to /etc/machine-id ?
I´d be glad to look it up, but how exactly do I go about doing that?
I´m using sylpheed on a regular (almost daily) basis but haven´t been able to sandbox it properly - up to now. I´ve always used the "--noprofile" option which isn´t the thing to do (as you pointed out).
Thanks again and many greetings.
Rosika
@ghost commented on GitHub (Mar 1, 2022):
That's correct. The syntax is indeed very specific: a space between
private-etcand the list of files/directories, each one seperated by a comma (and preferably in alphabetical order). A full breakfast :-) On top of that, private-etc 'accumulates', which is a complicated way of expressing that you can have more than one private-etc line in a profile, and Firejail combines thom all together when setting up the sandbox. That's the reason why you only need one extra in this case, for machine-id. Everything else from email-common.profile will be added already. I hope this clears things up a bit.Very welcome. Not that I'm trying to get you to use that instead of sylpheed, but it does have very active development, including reliable and speedy responses to CVE's. See https://www.claws-mail.org/ and here for details if you're interested.
Greetings!
@Rosika2 commented on GitHub (Mar 3, 2022):
@glitsj16:
Hi again,
so sorry I couldn´t reply earlier.
Thanks for the confirmation . :)
Wow, that´s great and really good to know. This makes adding
machine-ideasier indeed.No need to worry. I´m always grateful for any recommendations. Thanks a lot for the links. I´ll look into them.
I´d be glad to answer your question ...
... if you could just give me a hint of how to ascertain it (perhaps with
lsof?)Thanks a lot for your help.
Many grettings from Rosika :)
@ghost commented on GitHub (Mar 3, 2022):
You can use Firejail's
--trace[=filename]option:Something like
firejail --private-etc=machine-id --private=/media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/kgw_work3_sylpheed --trace=~/Downloads/sylpheed-trace.log sylpheedwill produce a file in your ~Downloads directory. After checking mail you can close sylpheed and grep the file for any references to /etc/machine-id.@Rosika2 commented on GitHub (Mar 3, 2022):
Hi again @glitsj16 ,
thanks so much for your help.
Indeed I have to admit that I´ve never used Firejail´s
--traceoption before. I´m glad you brought that to my attention. :)So I applied the command you kindly provided for me and it worked well. After running
sylpheedthat way, actively checking for new mails and then closing it again I got the following results:As you pointed out in your first answer:
I think it´s safe to say:
I seems I can confirm
sylpheeddoes need access to /etc/machine-id when I run it ...If any other information might be needed feel free to ask for it.
Many thanks again and many greetings.
Rosika
@ghost commented on GitHub (Mar 3, 2022):
Thanks for confirming. I've opened a PR so in a next release you shouldn't be needing the workaround any longer.
Take care out there :-)
@Rosika2 commented on GitHub (Mar 3, 2022):
Thanks very much for your kind help @glitsj16,
it´s highly appreciated.
I´ve seen your pull request already and I´m very thankful for your work.
I´ve learnt a lot in the process and I´m happy of being able to use
firejailwith my Linux distro.Many thanks again and keep safe.
Many greetings from Rosika :-)