xselinux: Don't throw BadAccess if DixUnknownAccess is passed in to a hook.
The avc will still appear, however, so that the callsite can be fixed.
This commit is contained in:
		
							parent
							
								
									3b1df47bd4
								
							
						
					
					
						commit
						e40cc5305b
					
				| 
						 | 
				
			
			@ -312,6 +312,8 @@ SELinuxDoCheck(SELinuxSubjectRec *subj, SELinuxObjectRec *obj,
 | 
			
		|||
 | 
			
		||||
    if (avc_has_perm(subj->sid, obj->sid, class, mode, &subj->aeref,
 | 
			
		||||
		     auditdata) < 0) {
 | 
			
		||||
	if (mode == DixUnknownAccess)
 | 
			
		||||
	    return Success; /* DixUnknownAccess requests OK ... for now */
 | 
			
		||||
	if (errno == EACCES)
 | 
			
		||||
	    return BadAccess;
 | 
			
		||||
	ErrorF("ServerPerm: unexpected error %d\n", errno);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue