Quiz (NIX Access Control) Flashcards
Linux (Unix) is a single-user OS. T/F
False. Its multiuser. Android is based on Linux.
Goals for main security mechanisms? (2 points)
- Enable user separation
- Enable protection of system code from user code
Special users running specific processes and root. T/F
True. For system process, root can do everything.
To perform system-level operations, a process invokes kernel code by using system calls. T/F
True.
Every running process has a ____ and ____.
Real user ID and effective user ID
What is the Real User ID? (2 points)
- The User ID of the user who opened the program
- Formally, the Real User ID of the parent process
What is the Effective user ID? (3 points)
- The User ID actually used to determine what a process can do
- Typically, User ID == Real User ID
- Formally, the Effective User ID of the parent process
User ID is a numeric value and it has an associated user name. T/F
True
The user root can do “everything”, its User ID is 1. T/F
False. The User ID is 0.
Every file has an associated owner user and an associated owner group. T/F
True.
Which command to use to list files and their owners?
ls -la
What is the command chown used for?
Change owner user/group
What is the command chmod used for?
Chmod changes file permissions.
When you interact with a CLI in a Linux machine you are actually interacting with a dedicated program. T/F
True
Bash creates child opens processes to run the program you specify on the command lines. T/F
True
What is setuid() used for?
When a program is executed (./program) the real UID and the effective UID of the corresponding process is the current user (displayed by id).
If a program is stored in a setuid file, the owner of the corresponding process will be the ___. This allows users to ____.
The owner of the file program; perform privileged operations, by opening setuid programs
When a process creates a new process, the child process ____.
keeps the same real user ID and effective user ID of its parent process
New processes are normally created with the ___ system calls.
fork/execv
Bash runs with _______.
real/effective user ID of the logged in user
If a program is stored in a setuid file, when run, the effective user ID of the executed program is equal to ___.
the owner of the file. The real user ID is unchanged.
Setuid programs must check that the calling user is ____.
supposed to execute the requested operation
Sudo allows to execute any command as the root user, but only if ___.
the correct user’s password is inserted
Supply a value of -1 for either the real or effective user ID forces ___.
the system to leave that ID unchanged