Permalink
Browse files

sync with head.

  • Loading branch information...
1 parent 544c19c commit 701c6f44636ff5dae80ecccc3168a38bdaae1400 peter committed Sep 25, 2006
@@ -1,4 +1,4 @@
-/* $NetBSD: pfctl_parser.c,v 1.7.2.1 2006/03/28 08:27:01 tron Exp $ */
+/* $NetBSD: pfctl_parser.c,v 1.7.2.2 2006/09/25 03:57:12 peter Exp $ */
/* $OpenBSD: pfctl_parser.c,v 1.211 2004/12/07 10:33:41 dhartmei Exp $ */
/*
@@ -942,11 +942,12 @@ print_rule(struct pf_rule *r, const char *anchor_call, int verbose)
if (!opts)
printf(", ");
opts = 0;
- for (j = 0; j < PFTM_MAX; ++j)
+ for (j = 0; pf_timeouts[j].name; ++j)
if (pf_timeouts[j].timeout == i)
break;
- printf("%s %u", j == PFTM_MAX ? "inv.timeout" :
- pf_timeouts[j].name, r->timeout[i]);
+ printf("%s %u", pf_timeouts[j].name ?
+ pf_timeouts[j].name : "inv.timeout",
+ r->timeout[i]);
}
printf(")");
}
View
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_afmap.c,v 1.9.12.2 2006/06/09 19:52:35 peter Exp $ */
+/* $NetBSD: altq_afmap.c,v 1.9.12.3 2006/09/25 03:56:59 peter Exp $ */
/* $KAME: altq_afmap.c,v 1.12 2005/04/13 03:44:24 suz Exp $ */
/*
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_afmap.c,v 1.9.12.2 2006/06/09 19:52:35 peter Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_afmap.c,v 1.9.12.3 2006/09/25 03:56:59 peter Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq.h"
@@ -373,7 +373,6 @@ afmioctl(dev, cmd, addr, flag, l)
int error = 0;
struct atm_flowmap *flowmap;
struct ifnet *ifp;
- struct proc *p = l->l_proc;
/* check cmd for superuser only */
switch (cmd) {
@@ -383,8 +382,8 @@ afmioctl(dev, cmd, addr, flag, l)
#if (__FreeBSD_version > 400000)
error = suser(p);
#else
- error = kauth_authorize_generic(p->p_cred,
- KAUTH_GENERIC_ISSUSER, &p->p_acflag);
+ error = kauth_authorize_generic(l->l_cred,
+ KAUTH_GENERIC_ISSUSER, &l->l_acflag);
#endif
if (error)
return (error);
View
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_blue.c,v 1.12.12.2 2006/06/09 19:52:35 peter Exp $ */
+/* $NetBSD: altq_blue.c,v 1.12.12.3 2006/09/25 03:56:59 peter Exp $ */
/* $KAME: altq_blue.c,v 1.15 2005/04/13 03:44:24 suz Exp $ */
/*
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_blue.c,v 1.12.12.2 2006/06/09 19:52:35 peter Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_blue.c,v 1.12.12.3 2006/09/25 03:56:59 peter Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq.h"
@@ -163,7 +163,6 @@ blueioctl(dev, cmd, addr, flag, l)
blue_queue_t *rqp;
struct blue_interface *ifacep;
struct ifnet *ifp;
- struct proc *p = l->l_proc;
int error = 0;
/* check super-user privilege */
@@ -175,8 +174,8 @@ blueioctl(dev, cmd, addr, flag, l)
if ((error = suser(p)) != 0)
return (error);
#else
- if ((error = kauth_authorize_generic(p->p_cred,
- KAUTH_GENERIC_ISSUSER, &p->p_acflag)) != 0)
+ if ((error = kauth_authorize_generic(l->l_cred,
+ KAUTH_GENERIC_ISSUSER, &l->l_acflag)) != 0)
return (error);
#endif
break;
View
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_cbq.c,v 1.12.12.3 2006/06/09 19:52:35 peter Exp $ */
+/* $NetBSD: altq_cbq.c,v 1.12.12.4 2006/09/25 03:56:59 peter Exp $ */
/* $KAME: altq_cbq.c,v 1.21 2005/04/13 03:44:24 suz Exp $ */
/*
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_cbq.c,v 1.12.12.3 2006/06/09 19:52:35 peter Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_cbq.c,v 1.12.12.4 2006/09/25 03:56:59 peter Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq.h"
@@ -1014,7 +1014,6 @@ cbqioctl(dev, cmd, addr, flag, l)
int flag;
struct lwp *l;
{
- struct proc *p = l->l_proc;
int error = 0;
/* check cmd for superuser only */
@@ -1026,8 +1025,8 @@ cbqioctl(dev, cmd, addr, flag, l)
#if (__FreeBSD_version > 400000)
error = suser(p);
#else
- error = kauth_authorize_generic(p->p_cred,
- KAUTH_GENERIC_ISSUSER, &p->p_acflag);
+ error = kauth_authorize_generic(l->l_cred,
+ KAUTH_GENERIC_ISSUSER, &l->l_acflag);
#endif
if (error)
return (error);
View
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_cdnr.c,v 1.10.12.2 2006/06/09 19:52:35 peter Exp $ */
+/* $NetBSD: altq_cdnr.c,v 1.10.12.3 2006/09/25 03:56:59 peter Exp $ */
/* $KAME: altq_cdnr.c,v 1.15 2005/04/13 03:44:24 suz Exp $ */
/*
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_cdnr.c,v 1.10.12.2 2006/06/09 19:52:35 peter Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_cdnr.c,v 1.10.12.3 2006/09/25 03:56:59 peter Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq.h"
@@ -1239,7 +1239,6 @@ cdnrioctl(dev, cmd, addr, flag, l)
{
struct top_cdnr *top;
struct cdnr_interface *ifacep;
- struct proc *p = l->l_proc;
int s, error = 0;
/* check super-user privilege */
@@ -1250,8 +1249,8 @@ cdnrioctl(dev, cmd, addr, flag, l)
#if (__FreeBSD_version > 400000)
if ((error = suser(p)) != 0)
#else
- if ((error = kauth_authorize_generic(p->p_cred,
- KAUTH_GENERIC_ISSUSER, &p->p_acflag)) != 0)
+ if ((error = kauth_authorize_generic(l->l_cred,
+ KAUTH_GENERIC_ISSUSER, &l->l_acflag)) != 0)
#endif
return (error);
break;
View
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_conf.c,v 1.12.12.2 2006/06/09 19:52:35 peter Exp $ */
+/* $NetBSD: altq_conf.c,v 1.12.12.3 2006/09/25 03:56:59 peter Exp $ */
/* $KAME: altq_conf.c,v 1.24 2005/04/13 03:44:24 suz Exp $ */
/*
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_conf.c,v 1.12.12.2 2006/06/09 19:52:35 peter Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_conf.c,v 1.12.12.3 2006/09/25 03:56:59 peter Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq.h"
@@ -169,7 +169,7 @@ dev_type_ioctl(altqioctl);
const struct cdevsw altq_cdevsw = {
altqopen, altqclose, noread, nowrite, altqioctl,
- nostop, notty, nopoll, nommap, nokqfilter
+ nostop, notty, nopoll, nommap, nokqfilter, D_OTHER,
};
int
@@ -212,7 +212,6 @@ altqioctl(dev, cmd, addr, flag, l)
int flag;
struct lwp *l;
{
- struct proc *p = l->l_proc;
int unit = minor(dev);
if (unit == 0) {
@@ -230,8 +229,8 @@ altqioctl(dev, cmd, addr, flag, l)
if ((error = suser(p)) != 0)
return (error);
#else
- if ((error = kauth_authorize_generic(p->p_cred,
- KAUTH_GENERIC_ISSUSER, &p->p_acflag)) != 0)
+ if ((error = kauth_authorize_generic(l->l_cred,
+ KAUTH_GENERIC_ISSUSER, &l->l_acflag)) != 0)
return (error);
#endif
break;
View
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_fifoq.c,v 1.7.12.2 2006/06/09 19:52:35 peter Exp $ */
+/* $NetBSD: altq_fifoq.c,v 1.7.12.3 2006/09/25 03:56:59 peter Exp $ */
/* $KAME: altq_fifoq.c,v 1.12 2003/07/10 12:07:48 kjc Exp $ */
/*
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_fifoq.c,v 1.7.12.2 2006/06/09 19:52:35 peter Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_fifoq.c,v 1.7.12.3 2006/09/25 03:56:59 peter Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq.h"
@@ -133,7 +133,6 @@ fifoqioctl(dev, cmd, addr, flag, l)
fifoq_state_t *q;
struct fifoq_interface *ifacep;
struct ifnet *ifp;
- struct proc *p = l->l_proc;
int error = 0;
/* check super-user privilege */
@@ -145,8 +144,8 @@ fifoqioctl(dev, cmd, addr, flag, l)
if ((error = suser(p)) != 0)
return (error);
#else
- if ((error = kauth_authorize_generic(p->p_cred,
- KAUTH_GENERIC_ISSUSER, &p->p_acflag)) != 0)
+ if ((error = kauth_authorize_generic(l->l_cred,
+ KAUTH_GENERIC_ISSUSER, &l->l_acflag)) != 0)
return (error);
#endif
break;
View
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_hfsc.c,v 1.12.12.2 2006/06/09 19:52:35 peter Exp $ */
+/* $NetBSD: altq_hfsc.c,v 1.12.12.3 2006/09/25 03:56:59 peter Exp $ */
/* $KAME: altq_hfsc.c,v 1.26 2005/04/13 03:44:24 suz Exp $ */
/*
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_hfsc.c,v 1.12.12.2 2006/06/09 19:52:35 peter Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_hfsc.c,v 1.12.12.3 2006/09/25 03:56:59 peter Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq.h"
@@ -1910,7 +1910,6 @@ hfscioctl(dev, cmd, addr, flag, l)
{
struct hfsc_if *hif;
struct hfsc_interface *ifacep;
- struct proc* p = l->l_proc;
int error = 0;
/* check super-user privilege */
@@ -1922,8 +1921,8 @@ hfscioctl(dev, cmd, addr, flag, l)
if ((error = suser(p)) != 0)
return (error);
#else
- if ((error = kauth_authorize_generic(p->p_cred,
- KAUTH_GENERIC_ISSUSER, &p->p_acflag)) != 0)
+ if ((error = kauth_authorize_generic(l->l_cred,
+ KAUTH_GENERIC_ISSUSER, &l->l_acflag)) != 0)
return (error);
#endif
break;
View
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_priq.c,v 1.9.12.2 2006/06/09 19:52:35 peter Exp $ */
+/* $NetBSD: altq_priq.c,v 1.9.12.3 2006/09/25 03:56:59 peter Exp $ */
/* $KAME: altq_priq.c,v 1.13 2005/04/13 03:44:25 suz Exp $ */
/*
* Copyright (C) 2000-2003
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_priq.c,v 1.9.12.2 2006/06/09 19:52:35 peter Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_priq.c,v 1.9.12.3 2006/09/25 03:56:59 peter Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq.h"
@@ -716,7 +716,6 @@ priqioctl(dev, cmd, addr, flag, l)
{
struct priq_if *pif;
struct priq_interface *ifacep;
- struct proc *p = l->l_proc;
int error = 0;
/* check super-user privilege */
@@ -728,8 +727,8 @@ priqioctl(dev, cmd, addr, flag, l)
if ((error = suser(p)) != 0)
return (error);
#else
- if ((error = kauth_authorize_generic(p->p_cred,
- KAUTH_GENERIC_ISSUSER, &p->p_acflag)) != 0)
+ if ((error = kauth_authorize_generic(l->l_cred,
+ KAUTH_GENERIC_ISSUSER, &l->l_acflag)) != 0)
return (error);
#endif
break;
View
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_red.c,v 1.13.12.3 2006/06/09 19:52:35 peter Exp $ */
+/* $NetBSD: altq_red.c,v 1.13.12.4 2006/09/25 03:56:59 peter Exp $ */
/* $KAME: altq_red.c,v 1.20 2005/04/13 03:44:25 suz Exp $ */
/*
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_red.c,v 1.13.12.3 2006/06/09 19:52:35 peter Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_red.c,v 1.13.12.4 2006/09/25 03:56:59 peter Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq.h"
@@ -81,6 +81,7 @@ __KERNEL_RCSID(0, "$NetBSD: altq_red.c,v 1.13.12.3 2006/06/09 19:52:35 peter Exp
#include <sys/sockio.h>
#include <sys/proc.h>
#include <sys/kernel.h>
+#include <sys/kauth.h>
#ifdef ALTQ_FLOWVALVE
#include <sys/queue.h>
#include <sys/time.h>
@@ -1101,7 +1102,7 @@ red_purgeq(rqp)
#define FV_STATS
-#if (__FreeBSD_version > 300000)
+#if (__FreeBSD_version > 300000) || defined(__HAVE_TIMECOUNTER)
#define FV_TIMESTAMP(tp) getmicrotime(tp)
#else
#define FV_TIMESTAMP(tp) { (*(tp)) = time; }
View
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_rio.c,v 1.8.12.2 2006/06/09 19:52:35 peter Exp $ */
+/* $NetBSD: altq_rio.c,v 1.8.12.3 2006/09/25 03:56:59 peter Exp $ */
/* $KAME: altq_rio.c,v 1.19 2005/04/13 03:44:25 suz Exp $ */
/*
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_rio.c,v 1.8.12.2 2006/06/09 19:52:35 peter Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_rio.c,v 1.8.12.3 2006/09/25 03:56:59 peter Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq.h"
@@ -81,6 +81,7 @@ __KERNEL_RCSID(0, "$NetBSD: altq_rio.c,v 1.8.12.2 2006/06/09 19:52:35 peter Exp
#include <sys/sockio.h>
#include <sys/kernel.h>
#endif
+#include <sys/kauth.h>
#include <net/if.h>
@@ -511,7 +512,6 @@ rioioctl(dev, cmd, addr, flag, l)
rio_queue_t *rqp;
struct rio_interface *ifacep;
struct ifnet *ifp;
- struct proc *p = l->l_proc;
int error = 0;
/* check super-user privilege */
@@ -523,8 +523,8 @@ rioioctl(dev, cmd, addr, flag, l)
if ((error = suser(p)) != 0)
return (error);
#else
- if ((error = kauth_authorize_generic(p->p_cred,
- KAUTH_GENERIC_ISSUSER, &p->p_acflag)) != 0)
+ if ((error = kauth_authorize_generic(l->l_cred,
+ KAUTH_GENERIC_ISSUSER, &l->l_acflag)) != 0)
return (error);
#endif
break;
Oops, something went wrong.

0 comments on commit 701c6f4

Please sign in to comment.