CVS log for src/sys/secmodel/extensions/secmodel_extensions.c
Up to [cvs.NetBSD.org] / src / sys / secmodel / extensions
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.16: download - view: text, markup, annotated - select for diffs
Sat Apr 22 13:54:19 2023 UTC (3 years, 6 months ago) by riastradh
Branches: MAIN
CVS tags: thorpej-ifq-base,
thorpej-ifq,
thorpej-altq-separation-base,
thorpej-altq-separation,
perseant-exfatfs-base-20261102,
perseant-exfatfs-base-20250801,
perseant-exfatfs-base-20240630,
perseant-exfatfs-base,
perseant-exfatfs,
netbsd-11-base,
netbsd-11-1-RELEASE,
netbsd-11-0-RELEASE,
netbsd-11-0-RC7,
netbsd-11-0-RC6,
netbsd-11-0-RC5,
netbsd-11-0-RC4,
netbsd-11-0-RC3,
netbsd-11-0-RC2,
netbsd-11-0-RC1,
netbsd-11,
HEAD
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +9 -171
lines
secmodel_extensions: Split vfs part into separate .c file.
This way we can provide weak rumpkern stubs that don't require
rumpvfs for things that are relevant to vfs, but if you do link
rumpvfs then you get the same logic in secmodel extensions.
Revision 1.15: download - view: text, markup, annotated - select for diffs
Tue Mar 29 22:29:29 2022 UTC (4 years, 7 months ago) by christos
Branches: MAIN
CVS tags: netbsd-10-base,
netbsd-10-2-RELEASE,
netbsd-10-1-RELEASE,
netbsd-10-0-RELEASE,
netbsd-10-0-RC6,
netbsd-10-0-RC5,
netbsd-10-0-RC4,
netbsd-10-0-RC3,
netbsd-10-0-RC2,
netbsd-10-0-RC1,
netbsd-10,
bouyer-sunxi-drm-base,
bouyer-sunxi-drm
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +4 -3
lines
isroot should be bool...
Revision 1.14: download - view: text, markup, annotated - select for diffs
Mon Mar 28 19:08:43 2022 UTC (4 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +3 -3
lines
secmodel: fix grammar in description of hardlink_check_gid
Revision 1.13: download - view: text, markup, annotated - select for diffs
Sun Mar 27 16:28:35 2022 UTC (4 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +59 -3
lines
Implement restrictions for adding hard links to files
Revision 1.8.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:09:02 2020 UTC (6 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.8.2.1: preferred, colored; branchpoint 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8.2.1: +7 -10
lines
Merge changes from current as of 20200406
Revision 1.12: download - view: text, markup, annotated - select for diffs
Mon Mar 16 21:20:12 2020 UTC (6 years, 8 months ago) by pgoyette
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base,
thorpej-i2c-spi-conf2,
thorpej-i2c-spi-conf-base,
thorpej-i2c-spi-conf,
thorpej-futex2-base,
thorpej-futex2,
thorpej-futex-base,
thorpej-futex,
thorpej-cfargs2-base,
thorpej-cfargs2,
thorpej-cfargs-base,
thorpej-cfargs,
phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1,
cjep_staticlib_x-base,
cjep_staticlib_x,
bouyer-xenpvh-base2,
bouyer-xenpvh-base1,
bouyer-xenpvh-base,
bouyer-xenpvh
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +4 -7
lines
Use the module subsystem's ability to process SYSCTL_SETUP() entries to
automate installation of sysctl nodes.
Note that there are still a number of device and pseudo-device modules
that create entries tied to individual device units, rather than to the
module itself. These are not changed.
Revision 1.10.6.1: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:21:10 2020 UTC (6 years, 8 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10: +5 -5
lines
Sync with head.
Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Feb 21 00:26:23 2020 UTC (6 years, 8 months ago) by joerg
Branches: MAIN
CVS tags: is-mlppp-base,
is-mlppp,
ad-namecache-base3
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +5 -5
lines
Explicitly cast pointers to uintptr_t before casting to enums. They are
not necessarily the same size. Don't cast pointers to bool, check for
NULL instead.
Revision 1.8.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:09:55 2019 UTC (7 years, 5 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +4 -2
lines
Sync with HEAD
Revision 1.7.16.2: download - view: text, markup, annotated - select for diffs
Thu Sep 6 06:56:47 2018 UTC (8 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.7.16.1: preferred, colored; branchpoint 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7.16.1: +4 -2
lines
Sync with HEAD
Resolve a couple of conflicts (result of the uimin/uimax changes)
Revision 1.10: download - view: text, markup, annotated - select for diffs
Tue Sep 4 14:31:19 2018 UTC (8 years, 2 months ago) by maxv
Branches: MAIN
CVS tags: phil-wifi-20191119,
phil-wifi-20190609,
pgoyette-compat-20190127,
pgoyette-compat-20190118,
pgoyette-compat-1226,
pgoyette-compat-1126,
pgoyette-compat-1020,
pgoyette-compat-0930,
pgoyette-compat-0906,
netbsd-9-base,
netbsd-9-5-RELEASE,
netbsd-9-4-RELEASE,
netbsd-9-3-RELEASE,
netbsd-9-2-RELEASE,
netbsd-9-1-RELEASE,
netbsd-9-0-RELEASE,
netbsd-9-0-RC2,
netbsd-9-0-RC1,
netbsd-9,
isaki-audio2-base,
isaki-audio2,
ad-namecache-base2,
ad-namecache-base1,
ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -2
lines
Introduce KAUTH_REQ_PROCESS_CANSEE_KPTR, and use it in the already-existing
modstat code. No real functional change.
Revision 1.9: download - view: text, markup, annotated - select for diffs
Sat Aug 25 09:54:37 2018 UTC (8 years, 2 months ago) by maxv
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +3 -2
lines
Add KAUTH_REQ_PROCESS_CANSEE_EPROC, and use it for the kern.proc node.
Same permission as before, so no functional change.
Revision 1.7.16.1: download - view: text, markup, annotated - select for diffs
Mon Apr 16 02:00:09 2018 UTC (8 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +21 -2
lines
Sync with HEAD, resolve some conflicts
Revision 1.7.10.1: download - view: text, markup, annotated - select for diffs
Thu Apr 12 20:09:38 2018 UTC (8 years, 7 months ago) by snj
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE,
netbsd-8-2-RELEASE,
netbsd-8-1-RELEASE,
netbsd-8-1-RC1,
netbsd-8-0-RELEASE,
netbsd-8-0-RC2,
netbsd-8-0-RC1
Diff to: previous 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7: +21 -2
lines
Pull up following revision(s) (requested by kamil in ticket #713):
sys/secmodel/extensions/secmodel_extensions.c: 1.8
Add new sysctl(3) entry: security.models.extensions.user_set_dbregs
Model this new sysctl(3) entry after "user_set_cpu_affinity" in the same
level of sysctl(3) switches.
Allow to read unconditionally Debug Registers (no change here). This is
convenient as even if a user of a debugger does not use hardware assisted
watchpoints/breakpoints, a debugger can still prompt these values to store
in an internal cache with context of registers. Reading them should have
no security concerns.
Add a paranoid MI switch that prohibits by default setting these registers
by a regular user (non-superuser). Make this switch disabled by default.
There are enough reserved bits out there to allow using them
unconditionally on hardened hosts.
Features shipped with Debug Registers are optional features in debuggers.
There is no reduction in elementary functionality.
Reviewed by <christos>
Sponsored by <The NetBSD Foundation>
Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Apr 8 14:46:32 2018 UTC (8 years, 7 months ago) by kamil
Branches: MAIN
CVS tags: phil-wifi-base,
pgoyette-compat-0728,
pgoyette-compat-0625,
pgoyette-compat-0521,
pgoyette-compat-0502,
pgoyette-compat-0422,
pgoyette-compat-0415
Branch point for: phil-wifi
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +21 -2
lines
Add new sysctl(3) entry: security.models.extensions.user_set_dbregs
Model this new sysctl(3) entry after "user_set_cpu_affinity" in the same
level of sysctl(3) switches.
Allow to read unconditionally Debug Registers (no change here). This is
convenient as even if a user of a debugger does not use hardware assisted
watchpoints/breakpoints, a debugger can still prompt these values to store
in an internal cache with context of registers. Reading them should have
no security concerns.
Add a paranoid MI switch that prohibits by default setting these registers
by a regular user (non-superuser). Make this switch disabled by default.
There are enough reserved bits out there to allow using them
unconditionally on hardened hosts.
Features shipped with Debug Registers are optional features in debuggers.
There is no reduction in elementary functionality.
Reviewed by <christos>
Sponsored by <The NetBSD Foundation>
Revision 1.3.4.4: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:39:20 2017 UTC (8 years, 11 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.3.4.3: preferred, colored; branchpoint 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.4.3: +44 -38
lines
update from HEAD
Revision 1.6.6.1: download - view: text, markup, annotated - select for diffs
Sun Dec 27 12:10:18 2015 UTC (10 years, 10 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6: +46 -40
lines
Sync with HEAD (as of 26th Dec)
Revision 1.7: download - view: text, markup, annotated - select for diffs
Sat Dec 12 14:57:52 2015 UTC (10 years, 11 months ago) by maxv
Branches: MAIN
CVS tags: tls-maxphys-base-20171202,
prg-localcount2-base3,
prg-localcount2-base2,
prg-localcount2-base1,
prg-localcount2-base,
prg-localcount2,
pgoyette-localcount-base,
pgoyette-localcount-20170426,
pgoyette-localcount-20170320,
pgoyette-localcount-20170107,
pgoyette-localcount-20161104,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726,
pgoyette-localcount,
pgoyette-compat-base,
pgoyette-compat-0407,
pgoyette-compat-0330,
pgoyette-compat-0322,
pgoyette-compat-0315,
perseant-stdc-iso10646-base,
perseant-stdc-iso10646,
nick-nhusb-base-20170825,
nick-nhusb-base-20170204,
nick-nhusb-base-20161204,
nick-nhusb-base-20161004,
nick-nhusb-base-20160907,
nick-nhusb-base-20160529,
nick-nhusb-base-20160422,
nick-nhusb-base-20160319,
nick-nhusb-base-20151226,
netbsd-8-base,
matt-nb8-mediatek-base,
matt-nb8-mediatek,
localcount-20160914,
jdolecek-ncq-base,
jdolecek-ncq,
bouyer-socketcan-base1,
bouyer-socketcan-base,
bouyer-socketcan
Branch point for: pgoyette-compat,
netbsd-8
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +46 -40
lines
secmodel_extensions_system_cb() is not mount-specific, even though
KAUTH_SYSTEM_MOUNT happens to be the only option handled here.
Put everything into a swith(action). No functional change.
Revision 1.3.4.3: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:43 2014 UTC (12 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.3.4.2: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.4.2: +3 -21
lines
Rebase to HEAD as of a few days ago.
Revision 1.3.2.3: download - view: text, markup, annotated - select for diffs
Thu May 22 11:41:17 2014 UTC (12 years, 5 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.3.2.2: preferred, colored; branchpoint 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.2.2: +23 -21
lines
sync with head.
for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
Revision 1.5.6.1: download - view: text, markup, annotated - select for diffs
Sun May 18 17:46:20 2014 UTC (12 years, 6 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +5 -23
lines
sync with head
Revision 1.6: download - view: text, markup, annotated - select for diffs
Tue Feb 25 18:30:13 2014 UTC (12 years, 8 months ago) by pooka
Branches: MAIN
CVS tags: yamt-pagecache-base9,
tls-maxphys-base,
tls-earlyentropy-base,
tls-earlyentropy,
rmind-smpnet-nbase,
rmind-smpnet-base,
riastradh-xf86-video-intel-2-7-1-pre-2-21-15,
riastradh-drm2-base3,
nick-nhusb-base-20150921,
nick-nhusb-base-20150606,
nick-nhusb-base-20150406,
nick-nhusb-base,
netbsd-7-nhusb-base-20170116,
netbsd-7-nhusb-base,
netbsd-7-nhusb,
netbsd-7-base,
netbsd-7-2-RELEASE,
netbsd-7-1-RELEASE,
netbsd-7-1-RC2,
netbsd-7-1-RC1,
netbsd-7-1-2-RELEASE,
netbsd-7-1-1-RELEASE,
netbsd-7-1,
netbsd-7-0-RELEASE,
netbsd-7-0-RC3,
netbsd-7-0-RC2,
netbsd-7-0-RC1,
netbsd-7-0-2-RELEASE,
netbsd-7-0-1-RELEASE,
netbsd-7-0,
netbsd-7
Branch point for: nick-nhusb
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +5 -23
lines
Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.
Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.
Revision 1.3.4.2: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:20:29 2013 UTC (13 years, 4 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.3.4.1: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.4.1: +5 -2
lines
resync from head
Revision 1.2.8.2: download - view: text, markup, annotated - select for diffs
Thu Mar 14 21:56:41 2013 UTC (13 years, 8 months ago) by riz
Branches: netbsd-6-0
CVS tags: netbsd-6-0-6-RELEASE,
netbsd-6-0-5-RELEASE,
netbsd-6-0-4-RELEASE,
netbsd-6-0-3-RELEASE,
netbsd-6-0-2-RELEASE
Diff to: previous 1.2.8.1: preferred, colored; branchpoint 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2.8.1: +5 -2
lines
Pull up following revision(s) (requested by martin in ticket #839):
sys/secmodel/extensions/secmodel_extensions.c: revision 1.5
Make the callback deal with embryonic connections which do not have
credentials yet. Fixes PR kern/47598.
Revision 1.2.2.2: download - view: text, markup, annotated - select for diffs
Thu Mar 14 21:56:23 2013 UTC (13 years, 8 months ago) by riz
Branches: netbsd-6
CVS tags: netbsd-6-1-RELEASE,
netbsd-6-1-RC4,
netbsd-6-1-RC3,
netbsd-6-1-RC2,
netbsd-6-1-5-RELEASE,
netbsd-6-1-4-RELEASE,
netbsd-6-1-3-RELEASE,
netbsd-6-1-2-RELEASE,
netbsd-6-1-1-RELEASE,
netbsd-6-1
Diff to: previous 1.2.2.1: preferred, colored; branchpoint 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2.2.1: +5 -2
lines
Pull up following revision(s) (requested by martin in ticket #839):
sys/secmodel/extensions/secmodel_extensions.c: revision 1.5
Make the callback deal with embryonic connections which do not have
credentials yet. Fixes PR kern/47598.
Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Feb 28 15:23:24 2013 UTC (13 years, 8 months ago) by martin
Branches: MAIN
CVS tags: riastradh-drm2-base2,
riastradh-drm2-base1,
riastradh-drm2-base,
riastradh-drm2,
khorben-n900,
agc-symver-base,
agc-symver
Branch point for: rmind-smpnet
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +5 -2
lines
Make the callback deal with embryonic connections which do not have
credentials yet. Fixes PR kern/47598.
Revision 1.3.4.1: download - view: text, markup, annotated - select for diffs
Mon Feb 25 00:30:10 2013 UTC (13 years, 8 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +20 -3
lines
resync with head
Revision 1.2.2.1: download - view: text, markup, annotated - select for diffs
Fri Feb 8 23:04:26 2013 UTC (13 years, 9 months ago) by riz
Branches: netbsd-6
CVS tags: netbsd-6-1-RC1
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +20 -3
lines
Pull up following revision(s) (requested by jym in ticket #802):
sys/secmodel/securelevel/secmodel_securelevel.c: revision 1.29
sys/secmodel/extensions/secmodel_extensions.c: revision 1.4
Re-instate backwards compatible security.models.bsd44.{curtain,securelevel}.
They were mistakenly removed when curtain and securelevel moved to
secmodel_extensions(9).
Reported by tls@ on tech-security@.
XXX will ask for pull-up for -6.
Revision 1.2.8.1: download - view: text, markup, annotated - select for diffs
Fri Feb 8 23:04:01 2013 UTC (13 years, 9 months ago) by riz
Branches: netbsd-6-0
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +20 -3
lines
Pull up following revision(s) (requested by jym in ticket #802):
sys/secmodel/securelevel/secmodel_securelevel.c: revision 1.29
sys/secmodel/extensions/secmodel_extensions.c: revision 1.4
Re-instate backwards compatible security.models.bsd44.{curtain,securelevel}.
They were mistakenly removed when curtain and securelevel moved to
secmodel_extensions(9).
Reported by tls@ on tech-security@.
XXX will ask for pull-up for -6.
Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Jan 28 00:51:29 2013 UTC (13 years, 9 months ago) by jym
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +20 -3
lines
Re-instate backwards compatible security.models.bsd44.{curtain,securelevel}.
They were mistakenly removed when curtain and securelevel moved to
secmodel_extensions(9).
Reported by tls@ on tech-security@.
XXX will ask for pull-up for -6.
Revision 1.3.2.2: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:50 2012 UTC (14 years, 7 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.3.2.1: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.2.1: +479 -0
lines
sync with head
Revision 1.2.4.3: download - view: text, markup, annotated - select for diffs
Thu Apr 5 21:33:50 2012 UTC (14 years, 7 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.2.4.2: preferred, colored; branchpoint 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2.4.2: +26 -6
lines
sync to latest -current.
Revision 1.3.2.1
Tue Mar 13 18:41:01 2012 UTC (14 years, 8 months ago) by yamt
Branches: yamt-pagecache
FILE REMOVED
Changes since revision 1.3: +0 -479
lines
file secmodel_extensions.c was added on branch yamt-pagecache on 2012-04-17 00:08:50 +0000
Revision 1.3: download - view: text, markup, annotated - select for diffs
Tue Mar 13 18:41:01 2012 UTC (14 years, 8 months ago) by elad
Branches: MAIN
CVS tags: yamt-pagecache-base8,
yamt-pagecache-base7,
yamt-pagecache-base6,
yamt-pagecache-base5,
yamt-pagecache-base4,
jmcneill-usbmp-base9,
jmcneill-usbmp-base8,
jmcneill-usbmp-base10
Branch point for: yamt-pagecache,
tls-maxphys
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +26 -6
lines
Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.
Most of these changes were brought up in the following messages:
http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html
Thanks to christos, manu, njoly, and jmmv for input.
Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.
Revision 1.2.4.2: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:58:24 2012 UTC (14 years, 9 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.2.4.1: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.4.1: +459 -0
lines
merge from -current (not sure why these were missed).
Revision 1.2.4.1
Sun Dec 4 21:04:51 2011 UTC (14 years, 11 months ago) by mrg
Branches: jmcneill-usbmp
FILE REMOVED
Changes since revision 1.2: +0 -459
lines
file secmodel_extensions.c was added on branch jmcneill-usbmp on 2012-02-18 07:58:24 +0000
Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Dec 4 21:04:51 2011 UTC (14 years, 11 months ago) by jym
Branches: MAIN
CVS tags: netbsd-6-base,
netbsd-6-0-RELEASE,
netbsd-6-0-RC2,
netbsd-6-0-RC1,
netbsd-6-0-1-RELEASE,
matt-nb6-plus-nbase,
matt-nb6-plus-base,
matt-nb6-plus,
jmcneill-usbmp-base7,
jmcneill-usbmp-base6,
jmcneill-usbmp-base5,
jmcneill-usbmp-base4,
jmcneill-usbmp-base3,
jmcneill-usbmp-base2
Branch point for: netbsd-6-0,
netbsd-6,
jmcneill-usbmp
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +6 -3
lines
When user_set_cpu_affinity is non-zero, only allow users to modify
the CPU affinity of the LWPs they own.
Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Dec 4 19:25:00 2011 UTC (14 years, 11 months ago) by jym
Branches: MAIN
Implement the register/deregister/evaluation API for secmodel(9). It
allows registration of callbacks that can be used later for
cross-secmodel "safe" communication.
When a secmodel wishes to know a property maintained by another
secmodel, it has to submit a request to it so the other secmodel can
proceed to evaluating the request. This is done through the
secmodel_eval(9) call; example:
bool isroot;
error = secmodel_eval("org.netbsd.secmodel.suser", "is-root",
cred, &isroot);
if (error == 0 && !isroot)
result = KAUTH_RESULT_DENY;
This one asks the suser module if the credentials are assumed to be root
when evaluated by suser module. If the module is present, it will
respond. If absent, the call will return an error.
Args and command are arbitrarily defined; it's up to the secmodel(9) to
document what it expects.
Typical example is securelevel testing: when someone wants to know
whether securelevel is raised above a certain level or not, the caller
has to request this property to the secmodel_securelevel(9) module.
Given that securelevel module may be absent from system's context (thus
making access to the global "securelevel" variable impossible or
unsafe), this API can cope with this absence and return an error.
We are using secmodel_eval(9) to implement a secmodel_extensions(9)
module, which plugs with the bsd44, suser and securelevel secmodels
to provide the logic behind curtain, usermount and user_set_cpu_affinity
modes, without adding hooks to traditional secmodels. This solves a
real issue with the current secmodel(9) code, as usermount or
user_set_cpu_affinity are not really tied to secmodel_suser(9).
The secmodel_eval(9) is also used to restrict security.models settings
when securelevel is above 0, through the "is-securelevel-above"
evaluation:
- curtain can be enabled any time, but cannot be disabled if
securelevel is above 0.
- usermount/user_set_cpu_affinity can be disabled any time, but cannot
be enabled if securelevel is above 0.
Regarding sysctl(7) entries:
curtain and usermount are now found under security.models.extensions
tree. The security.curtain and vfs.generic.usermount are still
accessible for backwards compat.
Documentation is incoming, I am proof-reading my writings.
Written by elad@, reviewed and tested (anita test + interact for rights
tests) by me. ok elad@.
See also
http://mail-index.netbsd.org/tech-security/2011/11/29/msg000422.html
XXX might consider va0 mapping too.
XXX Having a secmodel(9) specific printf (like aprint_*) for reporting
secmodel(9) errors might be a good idea, but I am not sure on how
to design such a function right now.
CVSweb <webmaster@jp.NetBSD.org>