···11-.\" $OpenBSD: bpf.4,v 1.47 2024/08/15 12:20:20 dlg Exp $
11+.\" $OpenBSD: bpf.4,v 1.48 2025/11/13 10:53:25 deraadt Exp $
22.\" $NetBSD: bpf.4,v 1.7 1995/09/27 18:31:50 thorpej Exp $
33.\"
44.\" Copyright (c) 1990 The Regents of the University of California.
···2323.\" This document is derived in part from the enet man page (enet.4)
2424.\" distributed with 4.3BSD Unix.
2525.\"
2626-.Dd $Mdocdate: August 15 2024 $
2626+.Dd $Mdocdate: November 13 2025 $
2727.Dt BPF 4
2828.Os
2929.Sh NAME
···229229Use of any other ioctl is denied with error
230230.Er EPERM .
231231Once a descriptor is locked, it is not possible to unlock it.
232232-A process with root privileges is not affected by the lock.
233232.Pp
234233A privileged program can open a
235234.Nm
+3-3
sys/net/bpf.c
···11-/* $OpenBSD: bpf.c,v 1.234 2025/07/07 02:28:50 jsg Exp $ */
11+/* $OpenBSD: bpf.c,v 1.235 2025/11/13 10:53:25 deraadt Exp $ */
22/* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */
3344/*
···778778 int error = 0;
779779780780 d = bpfilter_lookup(minor(dev));
781781- if (d->bd_locked && suser(p) != 0) {
782782- /* list of allowed ioctls when locked and not root */
781781+ if (d->bd_locked) {
782782+ /* list of allowed ioctls when locked */
783783 switch (cmd) {
784784 case BIOCGBLEN:
785785 case BIOCFLUSH: