FYI – under the hood, at the level of the Kernel

(The paragraph that follows is just FYI and optional; if interested in deeper details then take a look, or feel free to skip it.)

Within the Linux kernel, all task (process and thread) metadata is kept within a data structure called the task_struct (also known as the process descriptor). The information on what Linux calls the security context of a task is kept within this task structure, embedded inside another data structure called cred (short for credentials). This structure, cred, contains everything we've discussed: The modern POSIX capabilities bitmasks (or capability sets) as well as the traditional-style process privileges: the RUID, EUID, RGID, EGID (as well as the set[u|g]id and fs[u|g]id ...

Get Hands-On System Programming with Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.