mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 06:02:44 +00:00 
			
		
		
		
	Kernel: Use Process::credentials() and remove user ID/group ID helpers
Move away from using the group ID/user ID helpers in the process to allow for us to take advantage of the immutable credentials instead.
This commit is contained in:
		
							parent
							
								
									8026d8926c
								
							
						
					
					
						commit
						f86b671de2
					
				
					 27 changed files with 109 additions and 94 deletions
				
			
		|  | @ -12,28 +12,32 @@ ErrorOr<FlatPtr> Process::sys$getuid() | |||
| { | ||||
|     VERIFY_NO_PROCESS_BIG_LOCK(this); | ||||
|     TRY(require_promise(Pledge::stdio)); | ||||
|     return uid().value(); | ||||
|     auto credentials = this->credentials(); | ||||
|     return credentials->uid().value(); | ||||
| } | ||||
| 
 | ||||
| ErrorOr<FlatPtr> Process::sys$getgid() | ||||
| { | ||||
|     VERIFY_NO_PROCESS_BIG_LOCK(this); | ||||
|     TRY(require_promise(Pledge::stdio)); | ||||
|     return gid().value(); | ||||
|     auto credentials = this->credentials(); | ||||
|     return credentials->gid().value(); | ||||
| } | ||||
| 
 | ||||
| ErrorOr<FlatPtr> Process::sys$geteuid() | ||||
| { | ||||
|     VERIFY_NO_PROCESS_BIG_LOCK(this); | ||||
|     TRY(require_promise(Pledge::stdio)); | ||||
|     return euid().value(); | ||||
|     auto credentials = this->credentials(); | ||||
|     return credentials->euid().value(); | ||||
| } | ||||
| 
 | ||||
| ErrorOr<FlatPtr> Process::sys$getegid() | ||||
| { | ||||
|     VERIFY_NO_PROCESS_BIG_LOCK(this); | ||||
|     TRY(require_promise(Pledge::stdio)); | ||||
|     return egid().value(); | ||||
|     auto credentials = this->credentials(); | ||||
|     return credentials->egid().value(); | ||||
| } | ||||
| 
 | ||||
| ErrorOr<FlatPtr> Process::sys$getresuid(Userspace<UserID*> user_ruid, Userspace<UserID*> user_euid, Userspace<UserID*> user_suid) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Anthony Iacono
						Anthony Iacono