MFC: sys/netinet6/ipsec.c 1.45
- Use suser_cred(9) instead of directly comparing cr_uid. - Compare pointer with NULL, instead of 0. Reviewed by: rwatson
This commit is contained in:
parent
1a5273828f
commit
6c37569be2
@ -1222,7 +1222,8 @@ ipsec_init_pcbpolicy(so, pcb_sp)
|
||||
}
|
||||
bzero(new, sizeof(*new));
|
||||
|
||||
if (so->so_cred != 0 && so->so_cred->cr_uid == 0)
|
||||
if (so->so_cred != NULL &&
|
||||
suser_cred(so->so_cred, SUSER_ALLOWJAIL) == 0)
|
||||
new->priv = 1;
|
||||
else
|
||||
new->priv = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user