summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/contrib
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-10-10 15:00:20 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-10-31 13:18:46 +0100
commitcc5f4b27059007c215513df730bdd132e6a979f0 (patch)
tree501c4c022f8f66fa0adfccd794db8d848b044069 /freebsd/sys/contrib
parentDisable alternative routing tables (diff)
downloadrtems-libbsd-cc5f4b27059007c215513df730bdd132e6a979f0.tar.bz2
Use default PID value for all process identifiers
Diffstat (limited to 'freebsd/sys/contrib')
-rw-r--r--freebsd/sys/contrib/pf/net/pf_ioctl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/freebsd/sys/contrib/pf/net/pf_ioctl.c b/freebsd/sys/contrib/pf/net/pf_ioctl.c
index 766268cf..e1ef3fac 100644
--- a/freebsd/sys/contrib/pf/net/pf_ioctl.c
+++ b/freebsd/sys/contrib/pf/net/pf_ioctl.c
@@ -1490,7 +1490,11 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
bcopy(&pr->rule, rule, sizeof(struct pf_rule));
#ifdef __FreeBSD__
rule->cuid = td->td_ucred->cr_ruid;
+#ifndef __rtems__
rule->cpid = td->td_proc ? td->td_proc->p_pid : 0;
+#else /* __rtems__ */
+ rule->cpid = BSD_DEFAULT_PID;
+#endif /* __rtems__ */
#else
rule->cuid = p->p_cred->p_ruid;
rule->cpid = p->p_pid;
@@ -1760,7 +1764,11 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
bcopy(&pcr->rule, newrule, sizeof(struct pf_rule));
#ifdef __FreeBSD__
newrule->cuid = td->td_ucred->cr_ruid;
+#ifndef __rtems__
newrule->cpid = td->td_proc ? td->td_proc->p_pid : 0;
+#else /* __rtems__ */
+ newrule->cpid = BSD_DEFAULT_PID;
+#endif /* __rtems__ */
#else
newrule->cuid = p->p_cred->p_ruid;
newrule->cpid = p->p_pid;