The seccomp stuff makes what once was a simple script now kinda complex. What’s the worst case if there are bugs in the seccomp or apparmor? “Only” that sandbox is weaker? That wouldn’t be catastrophic to effectively run with brap alone. Or anything worse?
## Needed for apps to setup further sandboxing like Firefox/Chromium.
capability sys_admin,
capability sys_chroot,
capability sys_ptrace,
Maybe this could be a separate apparmor abstraction only to be included for wx?
sed -e ‘s/:.*//g’
Can you port to str_replace please?
Yes, but str_replace please.
usr/bin/sandbox-app-launcher: mv "${auto_dir}/seccomp-filter.c" "${auto_dir}/seccomp.c"
usr/bin/sandbox-app-launcher: mv "${auto_dir}/seccomp-filter.c" "${auto_dir}/seccomp-wx.c"
How’s ${auto_dir}/seccomp-filter.c
created?
That is a bit difficult to follow in the code flow.
cat < “${seccomp_filter_path}.c”
Perhaps add some comments?
syntax of autogen-seccomp should be
autogen-seccomp path/to/seccomp-whitelist path/to/output-file
?
Or have autogen-seccomp
echo to stdout
and then redirect (>
) to file?
"${auto_dir}/seccomp"
"${auto_dir}/seccomp-wx"
Why does it get executed? Also seems to compile and execute both every time? Could use a comment.
Please do not add /etc/sandbox-app-launcher
as that’s the task for apt purge
.
Yes, good for testing/cleanup purposes.
It is good to have the prompt separated from actual potential future apt integration.
When run by apt, most likely apt won’t “know” that X is running. After sudo, environment variables are scrubbed. And when apt runs dpkg, environment variables might be scrubbed again. (Unless running apt with sudo var=content apt ...
.)
By looking at /usr/share/applications/*.desktop
files perhaps?
But covers “mostly” graphical applications.
There is also some “other” stuff there.
(example /usr/share/applications/okularApplication_fax.desktop
)
That wouldn’t cover any CLI applications worth covering.
- mechanism in config enable/disabled yes/no
- already has sandbox config yes/no
- desktop files that should get a corresponding sandbox config yes/no
But that could easily end in usability disaster.
- Install application A which pulls application B as a dependency and then lots of sandbox config popups.
- If messing up config application, how users know how to change settings for that application? (start config gui again)
- Perhaps some apt hook should ensure that if an application is
apt purge
ed, it’s corresponding sandbox config is wiped too?
Yes, that is blocking many things.