12. Privileged Programs

Nearly all men can stand adversity, but if you want to test a man’s character, give him power.

–ABRAHAM LINCOLN

Most programs execute with a set of privileges inherited from the user who runs them. For example, a text editor can display only files that its user has permission to read. Some programs carry additional privileges that enable them to perform operations that their users would otherwise be prevented from performing. These are privileged programs.

When written properly, a privileged program grants regular users a limited amount of access to some shared resource, such as physical memory, a hardware device, or special files such as the password file or the mail queue. When written improperly, a vulnerable privileged ...

Get Secure Programming with Static Analysis 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.