Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jul 1996 21:04:47 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        hackers@FreeBSD.ORG, jrb@cs.pdx.edu
Subject:   Re: puzzled about if ioctls
Message-ID:  <199607241104.VAA22587@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>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



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