Re-order checks in socheckuid() so that we check all deny cases before
returning accept. MFC after: 3 days
This commit is contained in:
parent
fb72f180d5
commit
627de7fa2c
@ -2260,9 +2260,9 @@ socheckuid(struct socket *so, uid_t uid)
|
||||
|
||||
if (so == NULL)
|
||||
return (EPERM);
|
||||
if (so->so_cred->cr_uid == uid)
|
||||
return (0);
|
||||
return (EPERM);
|
||||
if (so->so_cred->cr_uid != uid)
|
||||
return (EPERM);
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
x
Reference in New Issue
Block a user