diff options
author | Andreas Kling <kling@serenityos.org> | 2021-05-30 22:06:28 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-30 23:09:37 +0200 |
commit | 33f2eeea4a39dd892bad3930d1f2cfdfa7e3a7f8 (patch) | |
tree | 02f659bb5fdf04603bf1d7b3902856a8ad574bfa /Base | |
parent | dfd988707c013d68f64fb56892480248fdce03a1 (diff) | |
download | serenity-33f2eeea4a39dd892bad3930d1f2cfdfa7e3a7f8.zip |
pls: Drastically simplify this program
Since this program is setuid-root, it should be as simple as possible.
To that end, remove `/etc/plsusers` and use filesystem permissions to
achieve the same thing. `/bin/pls` is now only executable by `root` or
members of the `wheel` group.
Also remove all the logic that went to great lengths to `unveil()` a
minimal set of filesystem paths that may be used for the command.
The complexity-to-benefit ratio did not seem justified, and I think
we're better off keeping this simple.
Finally, remove pledge promises the moment they are no longer needed.
Diffstat (limited to 'Base')
-rw-r--r-- | Base/etc/plsusers | 4 | ||||
-rw-r--r-- | Base/usr/share/man/man8/pls.md | 6 |
2 files changed, 1 insertions, 9 deletions
diff --git a/Base/etc/plsusers b/Base/etc/plsusers deleted file mode 100644 index 24fbad1611..0000000000 --- a/Base/etc/plsusers +++ /dev/null @@ -1,4 +0,0 @@ -# plsusers file -# Put any users you want to allow to run programs as root here -root -anon diff --git a/Base/usr/share/man/man8/pls.md b/Base/usr/share/man/man8/pls.md index 131261340c..867e62f7b1 100644 --- a/Base/usr/share/man/man8/pls.md +++ b/Base/usr/share/man/man8/pls.md @@ -10,8 +10,7 @@ $ pls [command] ## Description -Executes a command as the root user (uid and gid 0), given that the user executing `pls` is located in -the plsusers file. +Executes a command as superuser (UID and GID 0). This command is only available for users in the `wheel` group. It is possible to execute commands that contain hyphenated options via the use of `--`, which signifies the end of command options. For example: @@ -20,9 +19,6 @@ end of command options. For example: $ pls -- ls -la ``` -## Files -/etc/plsusers - List of users that can run `pls` - ## Examples ```sh |