Linux have capabilities, which are used to give a non-root process some privileges.
Does macOS and Solaris also have capabilities? if not, do they have something similar to capabilities?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Solaris has privileges, as described here: https://docs.oracle.com/cd/E23824_01/html/821-1456/prbac-2.html. Generally, Privileges would be assigned to roles, and then roles to users, and within the roles, you can assign very granular sets of privileges to executables and scripts. Solaris RBAC seems similar at first to
sudo, however it's really sort of the opposite, where you build granular privilege sets from the bottom up, in contrast to the
sudo model where you try to restrict privileges from the top down.
Despite being a long time OS X user, I am not aware of any granular
capabilities-like engine that can provide a similar function of regulating user and process privileges. Depending on what you need to to, you may be able to use
launchd to escalate privileges for (for example) a daemon. However I don't know how granular you can be.
As Tim Kennedy says, Solaris has privileges (and has has them since Solaris 10). As well as being assigned to users, privileges can also be assigned to processes by using the ppriv command.
Here's a link to an article I wrote in 2006 which describes Solaris' privilege API: https://www.oracle.com/technetwork/server-storage/solaris/program-privileges-136378.html