Deleted Added
full compact
ip_fil_freebsd.c (191548) ip_fil_freebsd.c (192895)
1/* $FreeBSD: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c 191548 2009-04-26 22:06:42Z zec $ */
1/* $FreeBSD: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c 192895 2009-05-27 14:11:23Z jamie $ */
2
3/*
4 * Copyright (C) 1993-2003 by Darren Reed.
5 *
6 * See the IPFILTER.LICENCE file for details on licencing.
7 */
8#if !defined(lint)
9static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed";

--- 303 unchanged lines hidden (view full) ---

313 * Filter ioctl interface.
314 */
315int iplioctl(dev, cmd, data, mode
316# if defined(_KERNEL) && ((BSD >= 199506) || (__FreeBSD_version >= 220000))
317, p)
318# if (__FreeBSD_version >= 500024)
319struct thread *p;
320# if (__FreeBSD_version >= 500043)
2
3/*
4 * Copyright (C) 1993-2003 by Darren Reed.
5 *
6 * See the IPFILTER.LICENCE file for details on licencing.
7 */
8#if !defined(lint)
9static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed";

--- 303 unchanged lines hidden (view full) ---

313 * Filter ioctl interface.
314 */
315int iplioctl(dev, cmd, data, mode
316# if defined(_KERNEL) && ((BSD >= 199506) || (__FreeBSD_version >= 220000))
317, p)
318# if (__FreeBSD_version >= 500024)
319struct thread *p;
320# if (__FreeBSD_version >= 500043)
321# define p_cred td_ucred
321# define p_uid td_ucred->cr_ruid
322# else
322# define p_uid td_ucred->cr_ruid
323# else
324# define p_cred t_proc->p_cred
323# define p_uid t_proc->p_cred->p_ruid
324# endif
325# else
326struct proc *p;
327# define p_uid p_cred->p_ruid
328# endif /* __FreeBSD_version >= 500024 */
329# else
330)

--- 6 unchanged lines hidden (view full) ---

337ioctlcmd_t cmd;
338caddr_t data;
339int mode;
340{
341 int error = 0, unit = 0;
342 SPL_INT(s);
343
344#if (BSD >= 199306) && defined(_KERNEL)
325# define p_uid t_proc->p_cred->p_ruid
326# endif
327# else
328struct proc *p;
329# define p_uid p_cred->p_ruid
330# endif /* __FreeBSD_version >= 500024 */
331# else
332)

--- 6 unchanged lines hidden (view full) ---

339ioctlcmd_t cmd;
340caddr_t data;
341int mode;
342{
343 int error = 0, unit = 0;
344 SPL_INT(s);
345
346#if (BSD >= 199306) && defined(_KERNEL)
347# if (__FreeBSD_version >= 500034)
348 if (securelevel_ge(p->p_cred, 3) && (mode & FWRITE))
349# else
345 if ((securelevel >= 3) && (mode & FWRITE))
350 if ((securelevel >= 3) && (mode & FWRITE))
351# endif
346 return EPERM;
347#endif
348
349 unit = GET_MINOR(dev);
350 if ((IPL_LOGMAX < unit) || (unit < 0))
351 return ENXIO;
352
353 if (fr_running <= 0) {

--- 1311 unchanged lines hidden ---
352 return EPERM;
353#endif
354
355 unit = GET_MINOR(dev);
356 if ((IPL_LOGMAX < unit) || (unit < 0))
357 return ENXIO;
358
359 if (fr_running <= 0) {

--- 1311 unchanged lines hidden ---