Re-order checks in socheckuid() so that we check all deny cases before

returning accept.

MFC after:	3 days
This commit is contained in:
Robert Watson 2005-02-18 18:43:33 +00:00
parent fb72f180d5
commit 627de7fa2c

View File

@ -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