summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authormo <mo.khan@gmail.com>2019-05-25 14:02:26 -0600
committermo <mo.khan@gmail.com>2019-05-25 14:02:26 -0600
commit4c269898fa56563e0dab5d7e9fbed676f8781abe (patch)
tree6ebb2cdaa5acc1fa03dd2672ba975029b88fdf1a /README.md
parent29154349c11e43fece205c663136b7450c010f67 (diff)
complete 8.17
Diffstat (limited to 'README.md')
-rw-r--r--README.md17
1 files changed, 17 insertions, 0 deletions
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?