-
Notifications
You must be signed in to change notification settings - Fork 555
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
mkdir and whitelist enhancements #1130
Comments
You can blacklist individual files or directories under /run today:
To blacklist /run is not possible, this is where firejail keeps its runtime data. I'll add support to whitelist /run. I can add mkdir support in /tmp directory, but not in other places. The directory will be created as the regular user starting the sandbox. I'll look into extending regx support. |
So, I guess, allowing whitelisting /run (as any other dir in
How about making it possible in general, but disabled by default (as you did for symlinks in private-bin)? And also forbid to enable it in user's configuration (only in system-wide config) I agree, that it can be potentially dangerous (although, I do not see the exact unavoidable flaw), but it is also situations where it can be useful (especially for the soft that wants to be run as root), and some users can take responsibility for their actions :-D.
Thanks! |
I added support for mkdir under /tmp directory. You can try it out.
For private-bin the symlinks already exist, and is assumed root user put them there. The problem is allowing the regular user to create directories as root. I'll add /run to whitelist options. What other directories would you need? |
ok, let's forget about So, as I said, it can be absolutelly any random path that user might want to whitelist for some reasons. |
Also, a bit offtop: am I missing something, or there is no option like
|
Use "mkfile" in profile files. Until I figure out the random whitelisting, I'll add support for /run and /usr. |
It will be nice if directives like
whitelist
/mkdir
/blacklist
/noblacklist
(and so on) support variables like${USER}
and${UID}
, and also allowed to use them "in-line" (look below).For example, firefox uses
/tmp/mozilla_mva0
as temp download dir (to download files, for opening in external programs) on my system.Here,
mva
is a username of system user running firefox.I'd very like to
whitelist
(andmkdir
, since it can to not exist at the timefirefox
starts) it, but it seems to be impossible without hardcoding username...Also, it is paths like
/run/user/1000/<...>
. And in some cases I'd very like to hide/run
from application (so it can't see foreign pids, sockets and so on), but allow it to use some sockets under/run/user/<uid>/
So, I'd like to use
for first case, and
for second.
===
Also, it will be nice to have regex/pcre support for the path-related directives (as I mentioned above, things like
[0-9]
can be useful, but much more useful thing in the paths is wildcards).mkdir
can (and probably should) not support expressions in last particle (since it is useless), but it should support them for0
topre-last
particles.===
Also, you mentioned in one of the previous issues, that you have plans to allow all paths under
/
bewhitelist
'ed.And that's great!
But they also should be allowed to be
mkdir
'ed,blacklist
'ed (especially/run
), and so on.Thanks for the attention :)
The text was updated successfully, but these errors were encountered: