Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Apr 1999 04:38:56 -0700 (PDT)
From:      Poul-Henning Kamp <phk@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/usr.sbin Makefile src/sys/conf files src/sys/gnu/ext2fs ext2_vnops.c src/sys/kern kern_jail.c init_main.c init_sysent.c kern_exit.c kern_fork.c kern_ktrace.c kern_mib.c kern_proc.c kern_prot.c kern_resource.c kern_sig.c ...
Message-ID:  <199904281138.EAA16129@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
phk         1999/04/28 04:38:54 PDT

  Modified files:
    usr.sbin             Makefile 
    sys/conf             files 
    sys/gnu/ext2fs       ext2_vnops.c 
    sys/kern             init_main.c init_sysent.c kern_exit.c 
                         kern_fork.c kern_ktrace.c kern_mib.c 
                         kern_proc.c kern_prot.c kern_resource.c 
                         kern_sig.c kern_sysctl.c kern_xxx.c 
                         sys_process.c syscalls.c uipc_usrreq.c 
                         vfs_syscalls.c vfs_vnops.c 
    sys/miscfs/devfs     devfs_vnops.c 
    sys/miscfs/procfs    procfs.h procfs_status.c procfs_vnops.c 
    sys/msdosfs          msdosfs_vnops.c 
    sys/net              bpf.c if.c if.h rtsock.c 
    sys/netinet          in.h in_pcb.c in_pcb.h tcp_subr.c 
                         tcp_usrreq.c udp_usrreq.c 
    sys/nfs              nfs_serv.c 
    sys/sys              proc.h syscall-hide.h syscall.h 
                         syscall.mk sysctl.h sysproto.h ucred.h 
                         unpcb.h 
    sys/ufs/ufs          ufs_vfsops.c ufs_vnops.c 
    bin/ps               print.c ps.1 
    lib/libc/sys         Makefile.inc 
    share/man/man9       suser.9 
  Added files:
    sys/kern             kern_jail.c 
    sys/sys              jail.h 
    usr.sbin/jail        Makefile jail.8 jail.c 
    lib/libc/sys         jail.2 
  Log:
  This Implements the mumbled about "Jail" feature.
  
  This is a seriously beefed up chroot kind of thing.  The process
  is jailed along the same lines as a chroot does it, but with
  additional tough restrictions imposed on what the superuser can do.
  
  For all I know, it is safe to hand over the root bit inside a
  prison to the customer living in that prison, this is what
  it was developed for in fact:  "real virtual servers".
  
  Each prison has an ip number associated with it, which all IP
  communications will be coerced to use and each prison has its own
  hostname.
  
  Needless to say, you need more RAM this way, but the advantage is
  that each customer can run their own particular version of apache
  and not stomp on the toes of their neighbors.
  
  It generally does what one would expect, but setting up a jail
  still takes a little knowledge.
  
  A few notes:
  
     I have no scripts for setting up a jail, don't ask me for them.
  
     The IP number should be an alias on one of the interfaces.
  
     mount a /proc in each jail, it will make ps more useable.
  
     /proc/<pid>/status tells the hostname of the prison for
     jailed processes.
  
     Quotas are only sensible if you have a mountpoint per prison.
  
     There are no privisions for stopping resource-hogging.
  
     Some "#ifdef INET" and similar may be missing (send patches!)
  
  If somebody wants to take it from here and develop it into
  more of a "virtual machine" they should be most welcome!
  
  Tools, comments, patches & documentation most welcome.
  
  Have fun...
  
  Sponsored by:   http://www.rndassociates.com/
  Run for almost a year by:       http://www.servetheweb.com/
  
  Revision  Changes    Path
  1.153     +2 -1      src/usr.sbin/Makefile
  1.211     +1 -0      src/sys/conf/files
  1.46      +1 -1      src/sys/gnu/ext2fs/ext2_vnops.c
  1.115     +4 -1      src/sys/kern/init_main.c
  1.65      +2 -1      src/sys/kern/init_sysent.c
  1.80      +8 -1      src/sys/kern/kern_exit.c
  1.61      +7 -1      src/sys/kern/kern_fork.c
  1.26      +3 -1      src/sys/kern/kern_ktrace.c
  1.19      +23 -3     src/sys/kern/kern_mib.c
  1.47      +6 -1      src/sys/kern/kern_proc.c
  1.47      +27 -19    src/sys/kern/kern_prot.c
  1.48      +2 -2      src/sys/kern/kern_resource.c
  1.55      +3 -3      src/sys/kern/kern_sig.c
  1.88      +3 -2      src/sys/kern/kern_sysctl.c
  1.30      +2 -2      src/sys/kern/kern_xxx.c
  1.45      +3 -1      src/sys/kern/sys_process.c
  1.58      +2 -1      src/sys/kern/syscalls.c
  1.43      +13 -2     src/sys/kern/uipc_usrreq.c
  1.123     +23 -7     src/sys/kern/vfs_syscalls.c
  1.68      +2 -2      src/sys/kern/vfs_vnops.c
  1.72      +7 -7      src/sys/miscfs/devfs/devfs_vnops.c
  1.23      +3 -2      src/sys/miscfs/procfs/procfs.h
  1.13      +7 -1      src/sys/miscfs/procfs/procfs_status.c
  1.66      +12 -1     src/sys/miscfs/procfs/procfs_vnops.c
  1.83      +5 -5      src/sys/msdosfs/msdosfs_vnops.c
  1.49      +6 -3      src/sys/net/bpf.c
  1.70      +17 -12    src/sys/net/if.c
  1.51      +2 -1      src/sys/net/if.h
  1.39      +3 -1      src/sys/net/rtsock.c
  1.40      +4 -1      src/sys/netinet/in.h
  1.49      +24 -6     src/sys/netinet/in_pcb.c
  1.27      +2 -1      src/sys/netinet/in_pcb.h
  1.53      +2 -2      src/sys/netinet/tcp_subr.c
  1.42      +3 -1      src/sys/netinet/tcp_usrreq.c
  1.50      +8 -2      src/sys/netinet/udp_usrreq.c
  1.75      +3 -3      src/sys/nfs/nfs_serv.c
  1.81      +16 -1     src/sys/sys/proc.h
  1.52      +2 -1      src/sys/sys/syscall-hide.h
  1.56      +3 -2      src/sys/sys/syscall.h
  1.11      +3 -2      src/sys/sys/syscall.mk
  1.73      +2 -1      src/sys/sys/sysctl.h
  1.46      +5 -1      src/sys/sys/sysproto.h
  1.12      +2 -3      src/sys/sys/ucred.h
  1.8       +2 -1      src/sys/sys/unpcb.h
  1.15      +2 -2      src/sys/ufs/ufs/ufs_vfsops.c
  1.113     +6 -6      src/sys/ufs/ufs/ufs_vnops.c
  1.35      +3 -1      src/bin/ps/print.c
  1.21      +6 -1      src/bin/ps/ps.1
  1.62      +2 -2      src/lib/libc/sys/Makefile.inc
  1.6       +45 -10    src/share/man/man9/suser.9


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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