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

Blacklisting /media/ except for one folder #3581

Closed
ihasaquesion opened this issue Aug 10, 2020 · 11 comments
Closed

Blacklisting /media/ except for one folder #3581

ihasaquesion opened this issue Aug 10, 2020 · 11 comments

Comments

@ihasaquesion
Copy link

ihasaquesion commented Aug 10, 2020

When I use a profile that has noblacklist /media/directory/path followed by a later blacklist /media/ I keep getting blacklist violations in the syslog: syscall opendir, path /media. These errors only appear when I include blacklist /media/.

How to blacklist all /media/ except for one directory?

And it also doesn't work when whitelisting the directory (next to the other whitelistings in the profile).

firejail version 0.9.62

@smitsohu
Copy link
Collaborator

It is easy, just do --noblacklist=/media/dir --blacklist=/media/*

@ihasaquesion
Copy link
Author

Doesn't work.
I'd like to use a profile, not command-line parameters. The profile is:

...
noblacklist /media/veracrypt1/dir
...
blacklist /media/*
...

@smitsohu
Copy link
Collaborator

smitsohu commented Aug 11, 2020

Ok, then it is

noblacklist /media/veracrypt
blacklist /media/*
noblacklist /media/veracrypt/dir
blacklist /media/veracrypt/*

Or just whitelist /media/veracrypt/dir.

If the latter does not work, please post the output of firejail --debug-whitelists --whitelist=/media/veracrypt/dir. Redact the name of the directory if you like.

@ihasaquesion
Copy link
Author

Thanks, whitelisting beneath the profile's blacklistings worked. Previously it didn't - probably because I kept the blacklistings.

@ihasaquesion
Copy link
Author

It worked for one profile but not the other. I also put whitelist to the bottom of the profile before caps.drop all. I tried removing the noblacklist for the same directory. It's the profile for #3579

@smitsohu
Copy link
Collaborator

Is there a disable-mnt line in that other profile?

@ihasaquesion
Copy link
Author

No, it's mostly the default JDownloader profile. I added include chromium.profile.

@rusty-snake
Copy link
Collaborator

No, it's mostly the default JDownloader profile. I added include chromium.profile.

… which includes chromium-common.profile which sets disable-mnt 🙄 .

@ihasaquesion
Copy link
Author

I suspected this line to be the culprit. How to enable-mnt without having to modify this profile?

@rusty-snake
Copy link
Collaborator

Add ignore disable-mnt before you include chromium.profile.

@ihasaquesion
Copy link
Author

Thank you!!

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

No branches or pull requests

3 participants