Replies: 4 comments 2 replies
-
I remember #2874. |
Beta Was this translation helpful? Give feedback.
-
(This post is mostly just about the dialog programs)
Using a simple dialog program sounds interesting, but on Arch, zenity depends (To be clear, I'm using the install size mostly as an indirect measure of If it's intended to be just an optional runtime dependency, I suppose something file='foo'
message="firejail: Allow $program:$pid to move $file?"
if command -v kdialog >/dev/null; then
kdialog params "$message"
elif command -v zenity >/dev/null; then
zenity params "$message"
elif command -v qarma >/dev/null; then
qarma params "$message"
elif command -v dmenu >/dev/null; then
printf 'Cancel\nOK\n' | dmenu -p "$message"
elif command -v xmessage >/dev/null; then
xmessage params "$message"
else
printf 'firejail: warning: no dialog program found, ignoring request from %s:%s to move %s\n' "$program" "$pid" "$file" >&2
fi This is similar to what neovim does to find a clipboard provider (it checks for To expand on the other programs listed above: qarma (qarma-git on the AUR) is a bit smaller, but still depends on qt5-base dmenu is the standard suckless tool for prompts, so it would be nice to have it xorg-xmessage might be the smallest (and is also used by awesomewm and a few For compile-time dependencies, I found this for X11: Possibly bigger than needed (compared to using some X11 lib directly). Not sure if there's a wayland equivalent. Maybe xdg portals could be used, but |
Beta Was this translation helpful? Give feedback.
-
The new API is |
Beta Was this translation helpful? Give feedback.
-
My original idea was something like a background service, an extension to the new IDS feature. But I think I see now the problem. It is going to make users the big boss in their home directories, and even root will have to obey their rules (as far as I understand).
Might still be possible, but only the subset of events that can be attached to a specific mount (FAN_MARK_MOUNT). However, I'm having difficulties to see a compelling use case for that. Maybe many sandboxes sharing a |
Beta Was this translation helpful? Give feedback.
-
The kernel
fanotify
api has improved a lot recently, and I started to wonder if that is something we would be interested in.For example, it is possible to watch regular files that are under control of the user (like in user home), and every time a program requests to write/move/remove these files, show a dialogue and ask to approve or reject. Maybe we could get away with something simple like
zenity
orkdialog
for the GUI (as long as there are not too many events).Since 5.13 there is also unprivileged fanotifyUnprivileged fanotify has not landed yet and it won't be able to do permission checks.Beta Was this translation helpful? Give feedback.
All reactions