]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
o Move per-process jail pointer (p->pr_prison) to inside of the subject
authorrwatson <rwatson@FreeBSD.org>
Wed, 21 Feb 2001 06:39:57 +0000 (06:39 +0000)
committerrwatson <rwatson@FreeBSD.org>
Wed, 21 Feb 2001 06:39:57 +0000 (06:39 +0000)
commitab5676fc870d2d819cf41120313443182db079cf
tree3ed13007d645ee25bab52d52b6aba08f7f0bcf1e
parent17bdecb1829f632354d48f743f10ff707edded9c
o Move per-process jail pointer (p->pr_prison) to inside of the subject
  credential structure, ucred (cr->cr_prison).
o Allow jail inheritence to be a function of credential inheritence.
o Abstract prison structure reference counting behind pr_hold() and
  pr_free(), invoked by the similarly named credential reference
  management functions, removing this code from per-ABI fork/exit code.
o Modify various jail() functions to use struct ucred arguments instead
  of struct proc arguments.
o Introduce jailed() function to determine if a credential is jailed,
  rather than directly checking pointers all over the place.
o Convert PRISON_CHECK() macro to prison_check() function.
o Move jail() function prototypes to jail.h.
o Emulate the P_JAILED flag in fill_kinfo_proc() and no longer set the
  flag in the process flags field itself.
o Eliminate that "const" qualifier from suser/p_can/etc to reflect
  mutex use.

Notes:

o Some further cleanup of the linux/jail code is still required.
o It's now possible to consider resolving some of the process vs
  credential based permission checking confusion in the socket code.
o Mutex protection of struct prison is still not present, and is
  required to protect the reference count plus some fields in the
  structure.

Reviewed by: freebsd-arch
Obtained from: TrustedBSD Project
34 files changed:
sys/compat/linprocfs/linprocfs.c
sys/compat/linprocfs/linprocfs_misc.c
sys/compat/linux/linux_mib.c
sys/compat/svr4/svr4_misc.c
sys/fs/procfs/procfs_status.c
sys/kern/init_main.c
sys/kern/kern_exit.c
sys/kern/kern_fork.c
sys/kern/kern_jail.c
sys/kern/kern_ktrace.c
sys/kern/kern_mib.c
sys/kern/kern_proc.c
sys/kern/kern_prot.c
sys/kern/sysv_msg.c
sys/kern/sysv_sem.c
sys/kern/sysv_shm.c
sys/kern/tty_pty.c
sys/kern/uipc_socket.c
sys/kern/uipc_usrreq.c
sys/kern/vfs_extattr.c
sys/kern/vfs_syscalls.c
sys/miscfs/procfs/procfs_status.c
sys/net/if.c
sys/net/if.h
sys/net/rtsock.c
sys/netinet/in.h
sys/netinet/in_pcb.c
sys/netinet/tcp_usrreq.c
sys/netinet/udp_usrreq.c
sys/sys/capability.h
sys/sys/jail.h
sys/sys/proc.h
sys/sys/systm.h
sys/sys/ucred.h