summaryrefslogtreecommitdiffstats
path: root/sys/net/pf_ioctl.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2014-03-30 21:54:48 +0000
committerguenther <guenther@openbsd.org>2014-03-30 21:54:48 +0000
commitd559b8cb6cdd6f912edd28712213aec79fb0b7bc (patch)
treeffe701d81fb3c6b370ebfd396ab32a273424b5b5 /sys/net/pf_ioctl.c
parentSupport relative arguments to .ll (increase or decrease line length). (diff)
downloadwireguard-openbsd-d559b8cb6cdd6f912edd28712213aec79fb0b7bc.tar.xz
wireguard-openbsd-d559b8cb6cdd6f912edd28712213aec79fb0b7bc.zip
Eliminates struct pcred by moving the real and saved ugids into
struct ucred; struct process then directly links to the ucred Based on a discussion at c2k10 or so before noting that FreeBSD and NetBSD did this too. ok matthew@
Diffstat (limited to 'sys/net/pf_ioctl.c')
-rw-r--r--sys/net/pf_ioctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c
index f87ea5ced82..7435817edbf 100644
--- a/sys/net/pf_ioctl.c
+++ b/sys/net/pf_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_ioctl.c,v 1.269 2014/02/04 01:04:03 tedu Exp $ */
+/* $OpenBSD: pf_ioctl.c,v 1.270 2014/03/30 21:54:48 guenther Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -1279,7 +1279,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
pool_put(&pf_rule_pl, rule);
break;
}
- rule->cuid = p->p_cred->p_ruid;
+ rule->cuid = p->p_ucred->cr_ruid;
rule->cpid = p->p_p->ps_pid;
switch (rule->af) {
@@ -1455,7 +1455,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
break;
}
pf_rule_copyin(&pcr->rule, newrule, ruleset);
- newrule->cuid = p->p_cred->p_ruid;
+ newrule->cuid = p->p_ucred->cr_ruid;
newrule->cpid = p->p_p->ps_pid;
switch (newrule->af) {