Subject: CVS commit: src
To: None <source-changes@NetBSD.org>
From: Elad Efrat <elad@netbsd.org>
List: source-changes
Date: 09/08/2006 20:58:58
Module Name: src
Committed By: elad
Date: Fri Sep 8 20:58:58 UTC 2006
Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man9: Makefile
src/sys/arch/amd64/amd64: netbsd32_machdep.c sys_machdep.c
src/sys/arch/i386/i386: sys_machdep.c
src/sys/arch/news68k/news68k: disksubr.c
src/sys/arch/newsmips/newsmips: disksubr.c
src/sys/arch/xen/i386: sys_machdep.c
src/sys/conf: files std
src/sys/dist/ipf/netinet: ip_fil_netbsd.c ip_nat.c
src/sys/dist/pf/net: pf_ioctl.c
src/sys/ipkdb: ipkdb_ipkdb.c
src/sys/kern: init_main.c init_sysctl.c kern_acct.c kern_auth.c
kern_lkm.c kern_ntptime.c kern_prot.c kern_resource.c kern_sysctl.c
kern_time.c kern_xxx.c vfs_syscalls.c
src/sys/miscfs/specfs: spec_vnops.c
src/sys/miscfs/umapfs: umap_vnops.c
src/sys/net: rtsock.c
src/sys/netinet: in_pcb.c ip_input.c raw_ip.c tcp_usrreq.c
src/sys/sys: kauth.h sysctl.h
src/sys/uvm: uvm_swap.c
Added Files:
src/share/man/man9: secmodel.9
src/sys/secmodel: files.secmodel secmodel.h
src/sys/secmodel/bsd44: bsd44.h files.bsd44 secmodel_bsd44.c
secmodel_bsd44_logic.c secmodel_bsd44_securelevel.c
secmodel_bsd44_suser.c securelevel.h suser.h
src/sys/secmodel/overlay: files.overlay overlay.h secmodel_overlay.c
Log Message:
First take at security model abstraction.
- Add a few scopes to the kernel: system, network, and machdep.
- Add a few more actions/sub-actions (requests), and start using them as
opposed to the KAUTH_GENERIC_ISSUSER place-holders.
- Introduce a basic set of listeners that implement our "traditional"
security model, called "bsd44". This is the default (and only) model we
have at the moment.
- Update all relevant documentation.
- Add some code and docs to help folks who want to actually use this stuff:
* There's a sample overlay model, sitting on-top of "bsd44", for
fast experimenting with tweaking just a subset of an existing model.
This is pretty cool because it's *really* straightforward to do stuff
you had to use ugly hacks for until now...
* And of course, documentation describing how to do the above for quick
reference, including code samples.
All of these changes were tested for regressions using a Python-based
testsuite that will be (I hope) available soon via pkgsrc. Information
about the tests, and how to write new ones, can be found on:
http://kauth.linbsd.org/kauthwiki
NOTE FOR DEVELOPERS: *PLEASE* don't add any code that does any of the
following:
- Uses a KAUTH_GENERIC_ISSUSER kauth(9) request,
- Checks 'securelevel' directly,
- Checks a uid/gid directly.
(or if you feel you have to, contact me first)
This is still work in progress; It's far from being done, but now it'll
be a lot easier.
Relevant mailing list threads:
http://mail-index.netbsd.org/tech-security/2006/01/25/0011.html
http://mail-index.netbsd.org/tech-security/2006/03/24/0001.html
http://mail-index.netbsd.org/tech-security/2006/04/18/0000.html
http://mail-index.netbsd.org/tech-security/2006/05/15/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/01/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/25/0000.html
Many thanks to YAMAMOTO Takashi, Matt Thomas, and Christos Zoulas for help
stablizing kauth(9).
Full credit for the regression tests, making sure these changes didn't break
anything, goes to Matt Fleming and Jaime Fournier.
Happy birthday Randi! :)
To generate a diff of this commit:
cvs rdiff -r1.920 -r1.921 src/distrib/sets/lists/comp/mi
cvs rdiff -r1.209 -r1.210 src/share/man/man9/Makefile
cvs rdiff -r0 -r1.1 src/share/man/man9/secmodel.9
cvs rdiff -r1.25 -r1.26 src/sys/arch/amd64/amd64/netbsd32_machdep.c
cvs rdiff -r1.7 -r1.8 src/sys/arch/amd64/amd64/sys_machdep.c
cvs rdiff -r1.74 -r1.75 src/sys/arch/i386/i386/sys_machdep.c
cvs rdiff -r1.23 -r1.24 src/sys/arch/news68k/news68k/disksubr.c
cvs rdiff -r1.20 -r1.21 src/sys/arch/newsmips/newsmips/disksubr.c
cvs rdiff -r1.7 -r1.8 src/sys/arch/xen/i386/sys_machdep.c
cvs rdiff -r1.810 -r1.811 src/sys/conf/files
cvs rdiff -r1.6 -r1.7 src/sys/conf/std
cvs rdiff -r1.21 -r1.22 src/sys/dist/ipf/netinet/ip_fil_netbsd.c
cvs rdiff -r1.12 -r1.13 src/sys/dist/ipf/netinet/ip_nat.c
cvs rdiff -r1.22 -r1.23 src/sys/dist/pf/net/pf_ioctl.c
cvs rdiff -r1.15 -r1.16 src/sys/ipkdb/ipkdb_ipkdb.c
cvs rdiff -r1.276 -r1.277 src/sys/kern/init_main.c
cvs rdiff -r1.82 -r1.83 src/sys/kern/init_sysctl.c
cvs rdiff -r1.66 -r1.67 src/sys/kern/kern_acct.c
cvs rdiff -r1.18 -r1.19 src/sys/kern/kern_auth.c
cvs rdiff -r1.91 -r1.92 src/sys/kern/kern_lkm.c
cvs rdiff -r1.35 -r1.36 src/sys/kern/kern_ntptime.c
cvs rdiff -r1.93 -r1.94 src/sys/kern/kern_prot.c
cvs rdiff -r1.103 -r1.104 src/sys/kern/kern_resource.c
cvs rdiff -r1.201 -r1.202 src/sys/kern/kern_sysctl.c
cvs rdiff -r1.105 -r1.106 src/sys/kern/kern_time.c
cvs rdiff -r1.59 -r1.60 src/sys/kern/kern_xxx.c
cvs rdiff -r1.267 -r1.268 src/sys/kern/vfs_syscalls.c
cvs rdiff -r1.88 -r1.89 src/sys/miscfs/specfs/spec_vnops.c
cvs rdiff -r1.39 -r1.40 src/sys/miscfs/umapfs/umap_vnops.c
cvs rdiff -r1.87 -r1.88 src/sys/net/rtsock.c
cvs rdiff -r1.103 -r1.104 src/sys/netinet/in_pcb.c
cvs rdiff -r1.229 -r1.230 src/sys/netinet/ip_input.c
cvs rdiff -r1.90 -r1.91 src/sys/netinet/raw_ip.c
cvs rdiff -r1.120 -r1.121 src/sys/netinet/tcp_usrreq.c
cvs rdiff -r0 -r1.1 src/sys/secmodel/files.secmodel \
src/sys/secmodel/secmodel.h
cvs rdiff -r0 -r1.1 src/sys/secmodel/bsd44/bsd44.h \
src/sys/secmodel/bsd44/files.bsd44 \
src/sys/secmodel/bsd44/secmodel_bsd44.c \
src/sys/secmodel/bsd44/secmodel_bsd44_logic.c \
src/sys/secmodel/bsd44/secmodel_bsd44_securelevel.c \
src/sys/secmodel/bsd44/secmodel_bsd44_suser.c \
src/sys/secmodel/bsd44/securelevel.h src/sys/secmodel/bsd44/suser.h
cvs rdiff -r0 -r1.1 src/sys/secmodel/overlay/files.overlay \
src/sys/secmodel/overlay/overlay.h \
src/sys/secmodel/overlay/secmodel_overlay.c
cvs rdiff -r1.5 -r1.6 src/sys/sys/kauth.h
cvs rdiff -r1.156 -r1.157 src/sys/sys/sysctl.h
cvs rdiff -r1.105 -r1.106 src/sys/uvm/uvm_swap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.