mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-21 15:45:02 +00: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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142055
@ -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 New Issue
Block a user