mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:32:45 +00:00 
			
		
		
		
	SystemMenu: Use pledge() and unveil()
This commit is contained in:
		
							parent
							
								
									2060da829c
								
							
						
					
					
						commit
						25b987ce4c
					
				
					 1 changed files with 17 additions and 0 deletions
				
			
		|  | @ -71,6 +71,23 @@ int main(int argc, char** argv) | |||
| 
 | ||||
|     GUI::WindowServerConnection::the().send_sync<Messages::WindowServer::SetSystemMenu>(menu->menu_id()); | ||||
| 
 | ||||
|     if (pledge("stdio shared_buffer accept rpath proc exec", nullptr) < 0) { | ||||
|         perror("pledge"); | ||||
|         return 1; | ||||
|     } | ||||
| 
 | ||||
|     if (unveil("/bin", "x")) { | ||||
|         perror("unveil"); | ||||
|         return 1; | ||||
|     } | ||||
| 
 | ||||
|     if (unveil("/res", "r")) { | ||||
|         perror("unveil"); | ||||
|         return 1; | ||||
|     } | ||||
| 
 | ||||
|     unveil(nullptr, nullptr); | ||||
| 
 | ||||
|     return app.exec(); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling