From owner-freebsd-hackers Wed Jul 24 04:06:48 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id EAA12684 for hackers-outgoing; Wed, 24 Jul 1996 04:06:48 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id EAA12678 for ; Wed, 24 Jul 1996 04:06:43 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id VAA22587; Wed, 24 Jul 1996 21:04:47 +1000 Date: Wed, 24 Jul 1996 21:04:47 +1000 From: Bruce Evans Message-Id: <199607241104.VAA22587@godzilla.zeta.org.au> To: hackers@FreeBSD.ORG, jrb@cs.pdx.edu Subject: Re: puzzled about if ioctls Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >The problem is basically that I need to check for su privilege >in an if_something.c network driver and there is no proc parameter >passed into it from above. Other more ordinary ioctl drivers Many parts of the kernel have this problem and use: struct proc *p = curproc; /* XXX */ (this makes passing the parameter around to other places mainly a waste of time :-(). See e.g., slopen() in if_sl.c. The proc parameter got lost a couple of layers above. >Whatever happened to good old suser() with no parameters? I wonder how often p != curproc in suser(). Bruce