mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
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
1 changed files with 3 additions and 3 deletions
|
|
@ -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…
Reference in a new issue