I’ve been thinking. Android implements app permissions on top of Linux, Flatpak does it too. But why is it it’s not part of the kernel?

Like all executable files would be sandboxed and would only be able to access syscalls and parts of the file system if they were allowed to. Making sandboxing the default instead of having to restrict programs.

I’m not a kernel developper so this question may be naive, but it bothers my mind. I guess part of it is because of historical reasons but are there any practical ones that make it not feasable?

EDIT : Thank you all for your answers, almost all of you were very nice and explained things clearly

  • Max-P@lemmy.max-p.me
    link
    fedilink
    English
    arrow-up
    6
    ·
    12 days ago

    A system where everything is sandboxed by default exists too, you do that with a rule that denies everything that’s not explicitly labeled for being allowed.

    Only your package manager knows, at install time, how to label an application such that it only have access to the stuff it needs access to. That information have to come from somewhere.

    Security is inherently a compromise. You’ve always been able to mount /home noexec so users can’t execute non-approved stuff. But then Steam doesn’t work, none of the games work because that makes them all foreign executables you’re not allowed to execute. Steam has Flatpak-specific code to make it work with the nested sandbox.

    It’s up to the distros to make those choices for the desired user experience. Most regular distros are a bit old fashioned and leaves a lot of freedom to the user. And you can have a distro for workstations at offices where you really cannot run anything but company software, for security. Or a distro like Steam OS so regular users can’t really break it.