From 4c269898fa56563e0dab5d7e9fbed676f8781abe Mon Sep 17 00:00:00 2001 From: mo Date: Sat, 25 May 2019 14:02:26 -0600 Subject: complete 8.17 --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 31c4aee..61cf12e 100644 --- a/README.md +++ b/README.md @@ -383,6 +383,23 @@ See `exercises/chapter-8.16`. 17. What are the purposes of the set-user-ID (SUID), set-group-ID (SGID), and sticky bits? +The purpose of the `SUID` and the `SGID` is to allow one user to run a +program on behalf of or another user. A common example is when a program +needs to write to a file that is owned by root. If the program is owned +by `root` and the `SUID` is permission is enabled on that program, then +a non-root user can run that program as if the `root` user was running +the program. This allows for non root users to do things like change +their passwords etc. This feature can also sometimes be abused if the +program with the `SUID` is on isn't written properly. e.g. buffer +overflow leading to arbitrary code execution. + +The `SGID` operates very similar to the `SUID` except that the program +runs as if it were a member of the group that owns the file. + +The `sticky bit` is used to ensure a user cannot remove files from a +directory owned by another user. This is common for shared folders like +`/tmp`. + ## Do problem 9 (What do the following commands do?) in Chapter 9. What do the following commands do? -- cgit v1.2.3