diff options
| author | Max Laier <mlaier@FreeBSD.org> | 2004-11-08 00:38:18 +0000 |
|---|---|---|
| committer | Max Laier <mlaier@FreeBSD.org> | 2004-11-08 00:38:18 +0000 |
| commit | 8be3dd9dffdb658fe985f5a7c2d24f3f588fc7d6 (patch) | |
| tree | 22e24b28fefc0231838e54885327cbb8aba33a42 /sys/contrib | |
| parent | e14976a94d5c4236e1db34a5c1cb6c15f9a46612 (diff) | |
Notes
Diffstat (limited to 'sys/contrib')
| -rw-r--r-- | sys/contrib/pf/net/pf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/contrib/pf/net/pf.c b/sys/contrib/pf/net/pf.c index 2a5b62792dea..861ddff9f1f7 100644 --- a/sys/contrib/pf/net/pf.c +++ b/sys/contrib/pf/net/pf.c @@ -2506,6 +2506,11 @@ pf_socket_lookup(uid_t *uid, gid_t *gid, int direction, struct pf_pdesc *pd) } #ifdef __FreeBSD__ INP_LOCK(inp); + if ((inp->inp_socket == NULL) || (inp->inp_socket->so_cred == NULL)) { + INP_UNLOCK(inp); + INP_INFO_RUNLOCK(pi); + return (0); + } *uid = inp->inp_socket->so_cred->cr_uid; *gid = inp->inp_socket->so_cred->cr_groups[0]; INP_UNLOCK(inp); |
