Move suser() and suser_xxx() prototypes and a related #define from

<sys/proc.h> to <sys/systm.h>.

Correctly document the #includes needed in the manpage.

Add one now needed #include of <sys/systm.h>.
Remove the consequent 48 unused #includes of <sys/proc.h>.
This commit is contained in:
Poul-Henning Kamp 2000-10-29 16:06:56 +00:00
parent d74a913b68
commit cf9fa8e725
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=67893
63 changed files with 16 additions and 66 deletions

View file

@ -42,8 +42,7 @@
.Nd check if process has superuser privelige
.Sh SYNOPSIS
.Fd #include <sys/param.h>
.Fd #include <sys/proc.h>
.Fd #include <sys/ucred.h>
.Fd #include <sys/systm.h>
.Ft int
.Fn suser "struct proc *proc"
.Ft int

View file

@ -95,7 +95,6 @@
#include <sys/sockio.h>
#include <sys/mbuf.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/ucred.h>
#include <sys/socket.h>
#ifdef ANCACHE

View file

@ -181,7 +181,6 @@ static dpt_sig_S ASR_sig = {
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/conf.h>
#include <sys/disklabel.h>
#include <sys/bus.h>

View file

@ -31,7 +31,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/malloc.h>
#include <sys/bio.h>
#include <sys/bus.h>

View file

@ -100,7 +100,6 @@
#include <sys/kernel.h>
#include <sys/mbuf.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/errno.h>

View file

@ -55,7 +55,6 @@
#include <sys/kernel.h>
#include <sys/mbuf.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/socket.h>
#include <sys/errno.h>
#include <sys/sockio.h>

View file

@ -46,7 +46,6 @@
#include <sys/kernel.h>
#include <sys/mbuf.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/socket.h>
#include <sys/errno.h>
#include <sys/sockio.h>

View file

@ -70,7 +70,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/tty.h>
#include <sys/proc.h>
#include <sys/conf.h>
#include <sys/dkstat.h>
#include <sys/fcntl.h>

View file

@ -70,7 +70,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/tty.h>
#include <sys/proc.h>
#include <sys/conf.h>
#include <sys/dkstat.h>
#include <sys/fcntl.h>

View file

@ -46,7 +46,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/tty.h>
#include <sys/proc.h>
#include <sys/conf.h>
#include <sys/dkstat.h>
#include <sys/fcntl.h>

View file

@ -49,7 +49,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/tty.h>
#include <sys/proc.h>
#include <sys/conf.h>
#include <sys/dkstat.h>
#include <sys/fcntl.h>

View file

@ -37,7 +37,6 @@
#include <sys/module.h>
#include <sys/bus.h>
#include <sys/poll.h>
#include <sys/proc.h>
#include <sys/select.h>
#include <sys/random.h>
#include <sys/vnode.h>

View file

@ -42,7 +42,6 @@
#include <sys/ipl.h>
#include <sys/kernel.h>
#include <sys/tty.h>
#include <sys/proc.h>
#include <sys/conf.h>
#include <sys/dkstat.h>
#include <sys/fcntl.h>

View file

@ -41,7 +41,6 @@
#include <sys/fcntl.h>
#include <sys/malloc.h>
#include <sys/tty.h>
#include <sys/proc.h>
#include <sys/dkstat.h>
#include <sys/conf.h>
#include <sys/kernel.h>

View file

@ -48,7 +48,6 @@ static const char si_copyright1[] = "@(#) Copyright (C) Specialix International
#include <sys/ioctl_compat.h>
#endif
#include <sys/tty.h>
#include <sys/proc.h>
#include <sys/conf.h>
#include <sys/fcntl.h>
#include <sys/dkstat.h>

View file

@ -23,7 +23,6 @@
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
#include <sys/ioctl_compat.h>
#endif
#include <sys/proc.h>
#include <sys/malloc.h>
#include <sys/tty.h>
#include <sys/conf.h>

View file

@ -31,7 +31,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/proc.h>
#include <sys/tty.h>
#include <sys/kernel.h>
#include <sys/consio.h>

View file

@ -61,7 +61,6 @@
#include <machine/cpu.h>
#endif
#endif
#include <sys/proc.h>
#include <sys/queue.h>
#include <machine/bus.h>

View file

@ -73,7 +73,6 @@
#include <sys/sockio.h>
#include <sys/mbuf.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/ucred.h>
#include <sys/socket.h>
#include <sys/module.h>

View file

@ -199,7 +199,6 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/syslog.h>
#include <sys/proc.h>
#include <sys/bus.h>
#include <sys/sysctl.h>

View file

@ -42,7 +42,6 @@
#include <sys/conf.h>
#include <sys/vnode.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/mount.h>
#include <sys/namei.h>
#include <sys/dirent.h>

View file

@ -32,7 +32,6 @@
#include <sys/types.h>
#include <sys/systm.h>
#include <sys/namei.h>
#include <sys/proc.h>
#include <sys/kernel.h>
#include <sys/vnode.h>
#include <sys/mount.h>

View file

@ -46,7 +46,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/vnode.h>
#include <sys/mount.h>
#include <sys/namei.h>

View file

@ -40,7 +40,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
#include <sys/kernel.h>

View file

@ -46,7 +46,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/tty.h>
#include <sys/proc.h>
#include <sys/conf.h>
#include <sys/dkstat.h>
#include <sys/fcntl.h>

View file

@ -49,7 +49,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/tty.h>
#include <sys/proc.h>
#include <sys/conf.h>
#include <sys/dkstat.h>
#include <sys/fcntl.h>

View file

@ -27,7 +27,6 @@
#include <sys/kernel.h>
#include <sys/fcntl.h>
#include <sys/conf.h>
#include <sys/proc.h>
#include <sys/tty.h>
#include <sys/socket.h>
#include <net/if.h>

View file

@ -70,7 +70,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/tty.h>
#include <sys/proc.h>
#include <sys/conf.h>
#include <sys/dkstat.h>
#include <sys/fcntl.h>

View file

@ -73,7 +73,6 @@
#include <sys/sockio.h>
#include <sys/mbuf.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/ucred.h>
#include <sys/socket.h>
#include <sys/module.h>

View file

@ -199,7 +199,6 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/syslog.h>
#include <sys/proc.h>
#include <sys/bus.h>
#include <sys/sysctl.h>

View file

@ -47,7 +47,6 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/tty.h>
#include <sys/proc.h>
#include <sys/conf.h>
#include <sys/fcntl.h>
#include <sys/uio.h>

View file

@ -42,7 +42,6 @@
#include <sys/ipl.h>
#include <sys/kernel.h>
#include <sys/tty.h>
#include <sys/proc.h>
#include <sys/conf.h>
#include <sys/dkstat.h>
#include <sys/fcntl.h>

View file

@ -47,7 +47,6 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/tty.h>
#include <sys/proc.h>
#include <sys/conf.h>
#include <sys/fcntl.h>
#include <sys/bus.h>

View file

@ -34,6 +34,7 @@
#include "opt_sysvipc.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/ipc.h>
#include <sys/proc.h>
#include <sys/ucred.h>

View file

@ -46,7 +46,6 @@
#include <sys/kernel.h>
#include <sys/reboot.h>
#include <sys/sysctl.h>
#include <sys/proc.h>
#include <sys/tty.h>
#include <sys/uio.h>

View file

@ -23,7 +23,6 @@
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
#include <sys/ioctl_compat.h>
#endif
#include <sys/proc.h>
#include <sys/malloc.h>
#include <sys/tty.h>
#include <sys/conf.h>

View file

@ -46,7 +46,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/vnode.h>
#include <sys/mount.h>
#include <sys/namei.h>

View file

@ -40,7 +40,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
#include <sys/kernel.h>

View file

@ -70,7 +70,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/dkstat.h>

View file

@ -37,7 +37,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
#include <sys/proc.h>
#include <sys/protosw.h>
#include <sys/socket.h>
#include <sys/socketvar.h>

View file

@ -1,11 +1,12 @@
/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
*
* $FreeBSD$
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/sockio.h>
#include <sys/malloc.h>
#include <sys/kernel.h>

View file

@ -1,11 +1,12 @@
/*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*
* $FreeBSD$
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/socket.h>

View file

@ -1,11 +1,12 @@
/*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*
* $FreeBSD$
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/socket.h>

View file

@ -36,7 +36,6 @@
*/
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sockio.h>
#include <sys/protosw.h>
#include <sys/socket.h>

View file

@ -50,7 +50,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/domain.h>
#include <sys/errno.h>
#include <sys/kernel.h>

View file

@ -62,7 +62,6 @@
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/conf.h>
#include <sys/proc.h>
#include <sys/mbuf.h>
#include <sys/malloc.h>
#include <sys/fcntl.h>

View file

@ -38,7 +38,6 @@
#include <sys/systm.h>
#include <sys/sockio.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/socket.h>
#include <sys/kernel.h>
#include <sys/sysctl.h>

View file

@ -51,7 +51,6 @@
#include <sys/socketvar.h>
#include <sys/sysctl.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <vm/vm_zone.h>

View file

@ -51,7 +51,6 @@
#include <sys/protosw.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/proc.h>
#include <net/if.h>
#include <net/route.h>

View file

@ -42,7 +42,6 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/proc.h>
#include <sys/protosw.h>
#include <sys/socket.h>
#include <sys/socketvar.h>

View file

@ -76,7 +76,6 @@
#include <sys/socketvar.h>
#include <sys/errno.h>
#include <sys/time.h>
#include <sys/proc.h>
#include <net/if.h>
#include <net/route.h>

View file

@ -82,7 +82,6 @@
#include <sys/time.h>
#include <sys/kernel.h>
#include <sys/syslog.h>
#include <sys/proc.h>
#include <net/if.h>
#include <net/if_types.h>

View file

@ -80,7 +80,6 @@
#include <sys/socketvar.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <net/if.h>
#include <net/route.h>

View file

@ -77,7 +77,6 @@
#include <sys/errno.h>
#include <sys/stat.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/syslog.h>
#include <net/if.h>

View file

@ -40,7 +40,6 @@
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/sockio.h>
#include <sys/proc.h>
#include <sys/socket.h>
#include <net/if.h>

View file

@ -39,7 +39,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/socket.h>
#include <sys/socketvar.h>

View file

@ -42,7 +42,6 @@
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/mbuf.h>
#include <sys/proc.h>
#include <sys/protosw.h>
#include <sys/socket.h>
#include <sys/socketvar.h>

View file

@ -32,7 +32,6 @@
#include <sys/types.h>
#include <sys/systm.h>
#include <sys/namei.h>
#include <sys/proc.h>
#include <sys/kernel.h>
#include <sys/vnode.h>
#include <sys/mount.h>

View file

@ -31,7 +31,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/malloc.h>
#include <sys/bio.h>
#include <sys/disklabel.h>

View file

@ -36,7 +36,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/malloc.h>
#include <sys/select.h>
#include <sys/sysctl.h>

View file

@ -394,8 +394,6 @@ MALLOC_DECLARE(M_ZOMBIE);
MALLOC_DECLARE(M_PARGS);
#endif
/* flags for suser_xxx() */
#define PRISON_ROOT 1
/* Handy macro to determine of p1 can mangle p2 */
@ -501,9 +499,6 @@ void schedclock __P((struct proc *));
void setrunnable __P((struct proc *));
void setrunqueue __P((struct proc *));
void sleepinit __P((void));
int suser __P((const struct proc *));
int suser_xxx __P((const struct ucred *cred, const struct proc *proc,
int flag));
void remrunqueue __P((struct proc *));
void cpu_switch __P((void));
void cpu_throw __P((void)) __dead2;

View file

@ -96,6 +96,7 @@ struct mtx;
struct proc;
struct timeval;
struct tty;
struct ucred;
struct uio;
void Debugger __P((const char *msg));
@ -166,6 +167,13 @@ void startprofclock __P((struct proc *));
void stopprofclock __P((struct proc *));
void setstatclockrate __P((int hzrate));
/* flags for suser_xxx() */
#define PRISON_ROOT 1
int suser __P((const struct proc *));
int suser_xxx __P((const struct ucred *cred, const struct proc *proc,
int flag));
char *getenv __P((char *name));
int getenv_int __P((char *name, int *data));
quad_t getenv_quad __P((char *name, quad_t *data));

View file

@ -50,7 +50,6 @@
#include <sys/stat.h>
#include <sys/bio.h>
#include <sys/buf.h>
#include <sys/proc.h>
#include <sys/mount.h>
#include <sys/unistd.h>
#include <sys/vnode.h>