mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:02:45 +00:00 
			
		
		
		
	Kernel: Only allow superuser to halt() the system (#342)
Following the discussion in #334, shutdown must also have root-only run permissions.
This commit is contained in:
		
							parent
							
								
									cd76b691fb
								
							
						
					
					
						commit
						a5d80f7e3b
					
				
					 6 changed files with 31 additions and 10 deletions
				
			
		|  | @ -515,6 +515,12 @@ int fsync(int fd) | |||
|     return 0; | ||||
| } | ||||
| 
 | ||||
| int halt() | ||||
| { | ||||
|     int rc = syscall(SC_halt); | ||||
|     __RETURN_WITH_ERRNO(rc, rc, -1); | ||||
| } | ||||
| 
 | ||||
| int reboot() | ||||
| { | ||||
|     int rc = syscall(SC_reboot); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jesse
						Jesse