Userland: Implement pls, a sudo clone

This commit is contained in:
Jesse Buhagiar 2021-04-14 12:23:55 +10:00 committed by Ali Mohammad Pur
commit 82b48d867d
Notes: sideshowbarker 2024-07-18 17:12:10 +09:00
6 changed files with 262 additions and 0 deletions

View file

@ -0,0 +1,41 @@
## Name
pls - Execute a command as root
## Synopsis
```**sh
$ pls [command]
```
## Description
Executes a command as the root user (uid and gid 0), given that the user executing `pls` is located in
the sudoers file.
It is possible to execute commands that contain hyphenated options via the use of `--`, which signifies the
end of command options. For example:
```sh
$ pls -- ls -la
```
## Files
/etc/sudoers - List of users that can run `pls`
## Examples
```sh
$ pls whoami
Password:
root
$
```
```sh
$ pls sh
Password:
# whoami
root
#
```