mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 10:12:45 +00:00 
			
		
		
		
	 33f2eeea4a
			
		
	
	
		33f2eeea4a
		
	
	
	
	
		
			
			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.
		
			
				
	
	
		
			37 lines
		
	
	
	
		
			485 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
	
		
			485 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| ## Name
 | |
| 
 | |
| pls - Execute a command as root
 | |
| 
 | |
| ## Synopsis
 | |
| 
 | |
| ```**sh
 | |
| $ pls [command]
 | |
| ```
 | |
| 
 | |
| ## Description
 | |
| 
 | |
| 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:
 | |
| 
 | |
| ```sh
 | |
| $ pls -- ls -la
 | |
| ```
 | |
| 
 | |
| ## Examples
 | |
| 
 | |
| ```sh
 | |
| $ pls whoami
 | |
| Password:
 | |
| root
 | |
| $
 | |
| ```
 | |
| 
 | |
| ```sh
 | |
| $ pls sh
 | |
| Password:
 | |
| # whoami
 | |
| root
 | |
| #
 | |
| ```
 |