News for hackers. Stuff that matters.
Re:macOS Nix setup: an alternative to Homebrew (2020) by Wowfunhappy on Wednesday July 14, 2021 @02:28AM (#27830279)
> Do I want Firefox to have access to my Contacts? My Photos? Do I want Facebook to have that access? To all of them, or just ones that I select? Should my disk utility have the ability to send data over the network? My IDE? My IDE plugins?

Wouldn't the POSIX way of handing this be to have Firefox run as its own "Firefox" user with different privileges?

Re:macOS Nix setup: an alternative to Homebrew (2020) by alxlaz on Wednesday July 14, 2021 @03:27AM (#27830570)
It would, but you run into all sorts of impedance mismatch. For example, how do you revoke and grant access to your photos folder to some applications, on demand? The straightforward way (create groups for each important folder access class) blows up in terms of size very quickly, and group changes don't really happen on-the-fly, either. Things can get even murkier when it comes to device access, and you also have to deal with all sorts of caveats like suid binaries. You also don't have the API required to easily deal with any of this (e.g. no simple API to prompt the user for permission to access a path, no simple API to retry access until the user either grants access or denies it etc.).
Re:macOS Nix setup: an alternative to Homebrew (2020) by stouset on Wednesday July 14, 2021 @03:13AM (#27830513)
How do you then grant Firefox write access to your Downloads folder, read access to folders on the fly when you want to upload a file, “general area only” location information, access to the microphone and camera only during video conferencing, etc?

You can do some of this with groups, but that’s difficult and runs into limitations pretty quick for even comparatively simple use-cases. And making a bunch of custom ab-hoc groups requires root access on top, when ideally a user should be able to manage fine-grained control without escalating their own privileges.

Traditional POSIX file permissions are a huge blunt hammer that don’t scale well to the fine-grained type of access that things like iOS let you configure.

Re:macOS Nix setup: an alternative to Homebrew (2020) by kaba0 on Wednesday July 14, 2021 @04:10AM (#27830793)
POSIX permissions are way too crude to be properly functional.

SELinux sort of solves that part of the equation with additional labels given to each file, but eg. Android only uses selinux for the base of the system. Modern security requires sandboxed applications with user-controllable permissions.

Re:macOS Nix setup: an alternative to Homebrew (2020) by curt15 on Wednesday July 14, 2021 @02:39PM (#27836693)
This is the basis of the Android app sandbox. Each app runs as its own user.