Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Feb 2015 17:51:30 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Bryan Drewery <bdrewery@FreeBSD.org>
Cc:        "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, Pedro Giffuni <pfg@FreeBSD.org>, Xin LI <delphij@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, Luigi Rizzo <rizzo@iet.unipi.it>
Subject:   Re: lost change 272451 - CAP_EVENT for tcpdump (Re: svn commit: r276788 - in head: contrib/tcpdump contrib/tcpdump/lbl contrib/tcpdump/missing usr.sbin/tcpdump/tcpdump
Message-ID:  <86wq3sfist.fsf@nine.des.no>
In-Reply-To: <54D3D703.7020405@FreeBSD.org> (Bryan Drewery's message of "Thu,  05 Feb 2015 14:48:03 -0600")
References:  <CA%2BhQ2%2BiDa4fn2bzbLk87Amp8aZxf1HJvEZ-T9vFwCuBFoPxvmQ@mail.gmail.com> <54D3CE82.2050204@FreeBSD.org> <54D3D703.7020405@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Bryan Drewery <bdrewery@FreeBSD.org> writes:
> The problem is that pf is implemented differently on FreeBSD and OpenBSD
> for pid/uid tracking. The code would be overly complex to support both
> and I gave up on that. Even getting it to work on FreeBSD required the
> _KERNEL define hack for UID_MAX, which our pf uses to note 'no uid value'.

First-class stupidity on POSIX's part which defines FOO_MAX for almost
every single integer type but not for uid_t or gid_t.  FreeBSD has them,
but Linux doesn't, so I usually end up doing

#ifndef UID_MAX
#define UID_MAX ((uid_t)-1)
#endif

in cross-platform code.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86wq3sfist.fsf>