The NetBSD Project

CVS log for src/sys/secmodel/suser/secmodel_suser.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / secmodel / suser

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.55.20.2 / (download) - annotate - [select for diffs], Fri Jan 13 19:14:13 2023 UTC (13 months, 1 week ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.55.20.1: +16 -2 lines
Diff to previous 1.55.20.1 (colored) to branchpoint 1.55 (colored) next main 1.56 (colored)

Pull up following revision(s) (requested by jakllsch in ticket #49):

	sys/secmodel/suser/secmodel_suser.c: revision 1.57
	sys/sys/kauth.h: revision 1.89
	sys/net/if_wg.c: revision 1.72
	sys/net/if_wg.c: revision 1.73
	sys/net/if_wg.c: revision 1.74

Check for authorization for SIOCSDRVSPEC and SIOCGDRVSPEC ioctls for wg(4).
Addresses PR 57161.

wg(4): Allow non-root to retrieve information other than the private
key and the peer preshared key.

Add kauth(9) enums for wg(4) and add use them in suser secmodel.

Refines fix for PR 57161.

centralize the kauth ugliness.

Revision 1.55.20.1 / (download) - annotate - [select for diffs], Fri Jan 13 19:00:20 2023 UTC (13 months, 1 week ago) by martin
Branch: netbsd-10
Changes since 1.55: +2 -15 lines
Diff to previous 1.55 (colored)

Pull up following revision(s) (requested by jakllsch in ticket #45):

	sys/secmodel/suser/secmodel_suser.c: revision 1.56
	sys/sys/kauth.h: revision 1.88
	sys/arch/sparc/conf/INSTALL: revision 1.106
	share/examples/secmodel/secmodel_example.c: revision 1.29
	sys/conf/files: revision 1.1306

remove lingering strip(4) remnants

more strip(4) removal, this time in kauth(9)

Revision 1.57 / (download) - annotate - [select for diffs], Thu Jan 5 18:29:45 2023 UTC (13 months, 2 weeks ago) by jakllsch
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.56: +16 -2 lines
Diff to previous 1.56 (colored)

wg(4): Allow non-root to retrieve information other than the private
key and the peer preshared key.

Add kauth(9) enums for wg(4) and add use them in suser secmodel.

Refines fix for PR 57161.

Revision 1.56 / (download) - annotate - [select for diffs], Thu Jan 5 17:36:53 2023 UTC (13 months, 2 weeks ago) by jakllsch
Branch: MAIN
Changes since 1.55: +2 -15 lines
Diff to previous 1.55 (colored)

more strip(4) removal, this time in kauth(9)

Revision 1.55 / (download) - annotate - [select for diffs], Tue Sep 8 14:12:57 2020 UTC (3 years, 5 months ago) by christos
Branch: 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, netbsd-10-base, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Changes since 1.54: +3 -2 lines
Diff to previous 1.54 (colored)

Add IP_BINDANY, IPV6_BINDANY which can be used to bind to any address in
order to implement transparent proxies.

Revision 1.54 / (download) - annotate - [select for diffs], Sat May 16 19:12:38 2020 UTC (3 years, 9 months ago) by alnsn
Branch: MAIN
Changes since 1.53: +6 -2 lines
Diff to previous 1.53 (colored)

Make it clear that only KAUTH_MACHDEP_SVS_DISABLE is deprecated.

Revision 1.53 / (download) - annotate - [select for diffs], Mon May 11 19:36:40 2020 UTC (3 years, 9 months ago) by alnsn
Branch: MAIN
Changes since 1.52: +3 -2 lines
Diff to previous 1.52 (colored)

KAUTH_MACHDEP_SVS_DISABLE is deprecated.

sysctl machdep.svs.enabled can't be changed anymore
at runtime because it's now a boot option.

Revision 1.44.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:09:02 2020 UTC (3 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.44.2.1: +7 -11 lines
Diff to previous 1.44.2.1 (colored) to branchpoint 1.44 (colored) next main 1.45 (colored)

Merge changes from current as of 20200406

Revision 1.52 / (download) - annotate - [select for diffs], Mon Mar 16 21:20:12 2020 UTC (3 years, 11 months ago) by pgoyette
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Changes since 1.51: +3 -7 lines
Diff to previous 1.51 (colored)

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.50.6.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:10 2020 UTC (3 years, 11 months ago) by ad
Branch: ad-namecache
Changes since 1.50: +6 -6 lines
Diff to previous 1.50 (colored) next main 1.51 (colored)

Sync with head.

Revision 1.51 / (download) - annotate - [select for diffs], Fri Feb 21 00:26:23 2020 UTC (4 years ago) by joerg
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.50: +6 -6 lines
Diff to previous 1.50 (colored)

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.44.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:56 2019 UTC (4 years, 8 months ago) by christos
Branch: phil-wifi
Changes since 1.44: +11 -14 lines
Diff to previous 1.44 (colored)

Sync with HEAD

Revision 1.50 / (download) - annotate - [select for diffs], Wed Apr 10 18:49:04 2019 UTC (4 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, 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
Changes since 1.49: +3 -2 lines
Diff to previous 1.49 (colored)

Add the NVMM_CTL ioctl, always privileged regardless of the permissions of
/dev/nvmm. We'll use it to provide a way for an admin to control the
registered VMs in the kernel.

Add an associated wrapper in libnvmm.

Revision 1.43.4.4 / (download) - annotate - [select for diffs], Sat Oct 20 06:58:46 2018 UTC (5 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.43.4.3: +8 -2 lines
Diff to previous 1.43.4.3 (colored) to branchpoint 1.43 (colored) next main 1.44 (colored)

Sync with head

Revision 1.49 / (download) - annotate - [select for diffs], Fri Oct 5 22:12:38 2018 UTC (5 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020
Changes since 1.48: +8 -2 lines
Diff to previous 1.48 (colored)

Provide a sysctl kern.expose_address to expose kernel addresses in
sysctl structure returns for non-root. Defaults to off. Turning it
on will restore sockstat/fstat and friends for regular users.

Revision 1.43.4.3 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:47 2018 UTC (5 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.43.4.2: +4 -2 lines
Diff to previous 1.43.4.2 (colored) to branchpoint 1.43 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.48 / (download) - annotate - [select for diffs], Tue Sep 4 14:31:19 2018 UTC (5 years, 5 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.47: +3 -2 lines
Diff to previous 1.47 (colored)

Introduce KAUTH_REQ_PROCESS_CANSEE_KPTR, and use it in the already-existing
modstat code. No real functional change.

Revision 1.47 / (download) - annotate - [select for diffs], Sat Aug 25 09:54:37 2018 UTC (5 years, 5 months ago) by maxv
Branch: MAIN
Changes since 1.46: +3 -2 lines
Diff to previous 1.46 (colored)

Add KAUTH_REQ_PROCESS_CANSEE_EPROC, and use it for the kern.proc node.
Same permission as before, so no functional change.

Revision 1.43.4.2 / (download) - annotate - [select for diffs], Sat Jul 28 04:38:12 2018 UTC (5 years, 6 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.43.4.1: +2 -14 lines
Diff to previous 1.43.4.1 (colored) to branchpoint 1.43 (colored)

Sync with HEAD

Revision 1.46 / (download) - annotate - [select for diffs], Sun Jul 15 05:16:45 2018 UTC (5 years, 7 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0728
Changes since 1.45: +2 -13 lines
Diff to previous 1.45 (colored)

Retire ipkdb entirely. The option was removed from the config files
yesterday.

ok kamil christos

Revision 1.45 / (download) - annotate - [select for diffs], Fri Jul 13 09:58:49 2018 UTC (5 years, 7 months ago) by maxv
Branch: MAIN
Changes since 1.44: +2 -3 lines
Diff to previous 1.44 (colored)

Remove KAUTH_MACHDEP_X86PMC, now unused.

Revision 1.42.10.2 / (download) - annotate - [select for diffs], Sat May 5 15:11:53 2018 UTC (5 years, 9 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2
Changes since 1.42.10.1: +3 -2 lines
Diff to previous 1.42.10.1 (colored) to branchpoint 1.42 (colored) next main 1.43 (colored)

Pull up following revision(s) (requested by alnsn in ticket #790):

	share/man/man9/secmodel_securelevel.9: revision 1.16
	sys/secmodel/suser/secmodel_suser.c: revision 1.44
	sys/secmodel/securelevel/secmodel_securelevel.c: revision 1.31
	sys/sys/kauth.h: revision 1.76
	sys/arch/x86/x86/svs.c: revision 1.18

Add KAUTH_MACHDEP_SVS_DISABLE and add support to secmodel_securelevel(9).
Disabling SVS is denied at securelevel 1 and above.

Add SVS. It may not be disabled at securelevel 1 and above.

Revision 1.43.4.1 / (download) - annotate - [select for diffs], Wed May 2 07:20:24 2018 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.43: +3 -2 lines
Diff to previous 1.43 (colored)

Synch with HEAD

Revision 1.44 / (download) - annotate - [select for diffs], Thu Apr 26 18:54:09 2018 UTC (5 years, 9 months ago) by alnsn
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502
Branch point for: phil-wifi
Changes since 1.43: +3 -2 lines
Diff to previous 1.43 (colored)

Add KAUTH_MACHDEP_SVS_DISABLE and add support to secmodel_securelevel(9).

Disabling SVS is denied at securelevel 1 and above.

Revision 1.39.2.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:20 2017 UTC (6 years, 2 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.39.2.2: +24 -9 lines
Diff to previous 1.39.2.2 (colored) to branchpoint 1.39 (colored) next main 1.40 (colored)

update from HEAD

Revision 1.41.6.2 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:16 2017 UTC (6 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.41.6.1: +12 -11 lines
Diff to previous 1.41.6.1 (colored) to branchpoint 1.41 (colored) next main 1.42 (colored)

Sync with HEAD

Revision 1.42.10.1 / (download) - annotate - [select for diffs], Tue Aug 1 23:18:30 2017 UTC (6 years, 6 months ago) by snj
Branch: netbsd-8
CVS Tags: netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.42: +12 -11 lines
Diff to previous 1.42 (colored)

Pull up following revision(s) (requested by maxv in ticket #164):
	distrib/sets/lists/base/md.amd64: revision 1.269
	distrib/sets/lists/debug/md.amd64: revision 1.97
	sys/arch/amd64/conf/GENERIC: revision 1.460
	sys/arch/amd64/conf/files.amd64: revision 1.89
	sys/arch/i386/conf/GENERIC: revision 1.1157
	sys/arch/i386/conf/files.i386: revision 1.379
	sys/arch/i386/i386/i386_trap.S: revision 1.7-1.8
	sys/arch/i386/include/frameasm.h: revision 1.16
	sys/arch/x86/include/sysarch.h: revision 1.12
	sys/arch/x86/x86/pmc.c: revision 1.8-1.10
	sys/arch/x86/x86/sys_machdep.c: revision 1.36
	sys/arch/xen/conf/files.compat: revision 1.26
	sys/secmodel/suser/secmodel_suser.c: revision 1.43
	sys/sys/kauth.h: revision 1.74
	usr.bin/pmc/Makefile: revision 1.5
	usr.bin/pmc/pmc.1: revision 1.12-1.13
	usr.bin/pmc/pmc.c: revision 1.24-1.25
style
--
style
--
Disable interrupts for T_NMI (inline calltrap). Note that there's still a
way to evade the NMI mode here, if a segment register faults in
INTRFASTEXIT; but we don't care. I didn't test this change, but it seems
fine enough.
--
Make the PMC syscalls privileged.
--
Check argc, and add a message.
--
include opt_pmc.h
--
Build the pmc tool on amd64.
--
Properly handle overflows, and take them into account in userland.
--
Update.
--
Enable PMCs by default.
--
Sort sections. Fix macro usage.

Revision 1.43 / (download) - annotate - [select for diffs], Wed Jun 14 17:48:41 2017 UTC (6 years, 8 months ago) by maxv
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825
Branch point for: pgoyette-compat
Changes since 1.42: +12 -11 lines
Diff to previous 1.42 (colored)

Make the PMC syscalls privileged.

Revision 1.41.6.1 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:16 2015 UTC (8 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.41: +16 -2 lines
Diff to previous 1.41 (colored)

Sync with HEAD

Revision 1.42 / (download) - annotate - [select for diffs], Mon Aug 17 06:16:03 2015 UTC (8 years, 6 months ago) by knakahara
Branch: MAIN
CVS Tags: 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, 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, nick-nhusb-base-20150921, netbsd-8-base, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-8
Changes since 1.41: +16 -2 lines
Diff to previous 1.41 (colored)

Add kernel code to support intrctl(8).

Revision 1.39.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:43 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-maxphys
Changes since 1.39.2.1: +3 -9 lines
Diff to previous 1.39.2.1 (colored) to branchpoint 1.39 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.34.14.3 / (download) - annotate - [select for diffs], Thu May 22 11:41:17 2014 UTC (9 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.34.14.2: +3 -9 lines
Diff to previous 1.34.14.2 (colored) to branchpoint 1.34 (colored) next main 1.35 (colored)

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.40.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:20 2014 UTC (9 years, 9 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.40: +3 -9 lines
Diff to previous 1.40 (colored) next main 1.41 (colored)

sync with head

Revision 1.41 / (download) - annotate - [select for diffs], Tue Feb 25 18:30:13 2014 UTC (9 years, 11 months ago) by pooka
Branch: 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-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
Changes since 1.40: +3 -9 lines
Diff to previous 1.40 (colored)

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.34.14.2 / (download) - annotate - [select for diffs], Wed Jan 16 05:33:52 2013 UTC (11 years, 1 month ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.34.14.1: +2 -4 lines
Diff to previous 1.34.14.1 (colored) to branchpoint 1.34 (colored)

sync with (a bit old) head

Revision 1.39.2.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:51 2012 UTC (11 years, 3 months ago) by tls
Branch: tls-maxphys
Changes since 1.39: +2 -4 lines
Diff to previous 1.39 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.40 / (download) - annotate - [select for diffs], Tue Nov 13 20:10:03 2012 UTC (11 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: rmind-smpnet
Changes since 1.39: +2 -4 lines
Diff to previous 1.39 (colored)

kill some -Wunused-but-set-variable warnings

Revision 1.34.14.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:51 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.34: +204 -151 lines
Diff to previous 1.34 (colored)

sync with head

Revision 1.35.2.2 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:50 2012 UTC (11 years, 10 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.35.2.1: +157 -14 lines
Diff to previous 1.35.2.1 (colored) to branchpoint 1.35 (colored) next main 1.36 (colored)

sync to latest -current.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Mar 13 18:41:02 2012 UTC (11 years, 11 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base10
Branch point for: tls-maxphys
Changes since 1.38: +157 -14 lines
Diff to previous 1.38 (colored)

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.35.2.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:47 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.35: +50 -141 lines
Diff to previous 1.35 (colored)

merge to -current.

Revision 1.38 / (download) - annotate - [select for diffs], Tue Jan 17 10:47:28 2012 UTC (12 years, 1 month ago) by cegger
Branch: MAIN
CVS Tags: netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, 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, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, 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, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, 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
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored)

fix secmodel implementation of CPU_UCODE.
ok wiz@ for the manpages
ok elad@

Revision 1.37 / (download) - annotate - [select for diffs], Fri Jan 13 16:05:15 2012 UTC (12 years, 1 month ago) by cegger
Branch: MAIN
Changes since 1.36: +3 -2 lines
Diff to previous 1.36 (colored)

Support CPU microcode loading via cpuctl(8).
Implemented and enabled via CPU_UCODE kernel config option
for x86 and Xen Dom0.
Tested on different AMD machines with different
CPU families.

ok wiz@ for the manpages
ok releng@
ok core@ via releng@

Revision 1.36 / (download) - annotate - [select for diffs], Sun Dec 4 19:25:01 2011 UTC (12 years, 2 months ago) by jym
Branch: MAIN
Changes since 1.35: +49 -141 lines
Diff to previous 1.35 (colored)

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.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Nov 23 10:47:49 2011 UTC (12 years, 3 months ago) by tls
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.34: +3 -2 lines
Diff to previous 1.34 (colored)


Load entropy at system boot (only works at securelevel < 1); save
at system shutdown.  Disable with random_seed=NO in rc.conf if desired.

Goes to some trouble to never load or save to network filesystems.

Entropy should really be loaded by the boot loader but I am still
sorting out how to pass it to the kernel.

Revision 1.34.4.2 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:41 2010 UTC (13 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.34.4.1: +897 -0 lines
Diff to previous 1.34.4.1 (colored) to branchpoint 1.34 (colored) next main 1.35 (colored)

sync with head

Revision 1.34.4.1, Tue Dec 29 04:25:30 2009 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.34: +0 -897 lines
FILE REMOVED

file secmodel_suser.c was added on branch yamt-nfs-mp on 2010-03-11 15:04:41 +0000

Revision 1.34 / (download) - annotate - [select for diffs], Tue Dec 29 04:25:30 2009 UTC (14 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, uebayasi-xip, rmind-uvmplock-nbase, rmind-uvmplock-base, rmind-uvmplock, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache, yamt-nfs-mp
Changes since 1.33: +4 -6 lines
Diff to previous 1.33 (colored)

Use the socket credentials, now that we have them, instead of uidinfo.

Revision 1.33 / (download) - annotate - [select for diffs], Thu Dec 24 19:02:07 2009 UTC (14 years, 2 months ago) by elad
Branch: MAIN
Changes since 1.32: +2 -10 lines
Diff to previous 1.32 (colored)

Rename KAUTH_GENERIC_CANSEE to KAUTH_GENERIC_UNUSED1 and remove handling for
the former.

(I'll remove it from the header next time a kernel version bump happens.)

Revision 1.32 / (download) - annotate - [select for diffs], Wed Nov 18 09:47:18 2009 UTC (14 years, 3 months ago) by stacktic
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

Fixed security.models.suser.curtain to deny when uid does not match.
OK pooka@

Revision 1.31 / (download) - annotate - [select for diffs], Sat Nov 14 18:36:56 2009 UTC (14 years, 3 months ago) by elad
Branch: MAIN
Changes since 1.30: +2 -13 lines
Diff to previous 1.30 (colored)

- Move kauth_init() a little bit higher.

- Add spec_init() to authorize special device actions (and passthru too for
  the time being). Move policy out of secmodel_suser.

Revision 1.30 / (download) - annotate - [select for diffs], Wed Oct 7 01:31:41 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.29: +64 -58 lines
Diff to previous 1.29 (colored)

Extract usermount policy to its own routine.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Oct 6 21:07:06 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.28: +2 -5 lines
Diff to previous 1.28 (colored)

Add a (weak aliased) machdep_init() as a place to do machdep initialization
that can't happen as early as the other init functions as called from
cpu_startup() -- for example, register kauth(9) listeners.

Put unprivileged policy in the x86 code; used by i386, amd64, and xen.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Oct 6 20:34:22 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.27: +42 -2 lines
Diff to previous 1.27 (colored)

Allow root to do things that the subsystem allows as well (unify).

This is important in the case someone manages to load the suser secmodel
and remove subsystem specific listeners; without this change they would
have ended up with a root user that can only do privileged operations.

Revision 1.27 / (download) - annotate - [select for diffs], Mon Oct 5 04:20:13 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.26: +48 -59 lines
Diff to previous 1.26 (colored)

- Add usermount_common_policy() that implements some common (everything
  but access control) user mounting policies: enforced MNT_NOSUID and
  MNT_NODEV, no MNT_EXPORT, MNT_EXEC propagation. This can be useful for
  secmodels that are interested in simply adding finer grained user mount
  support.

- Add a mount subsystem listener for KAUTH_REQ_SYSTEM_MOUNT_GET.

Revision 1.26 / (download) - annotate - [select for diffs], Sat Oct 3 03:59:39 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.25: +2 -6 lines
Diff to previous 1.25 (colored)

Move KAUTH_NETWORK_BIND::KAUTH_REQ_NETWORK_BIND_PORT policy back to the
subsystem (or close to it).

Note: Revisit KAUTH_REQ_NETWORK_BIND_PRIVPORT.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Oct 3 03:38:31 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.24: +15 -41 lines
Diff to previous 1.24 (colored)

Move policies for KAUTH_PROCESS_{CANSEE,CORENAME,STOPFLAG,FORK} back to
the subsystem.

Note: Consider killing the signal listener and sticking
      KAUTH_PROCESS_SIGNAL here as well.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Oct 3 03:02:55 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.23: +2 -4 lines
Diff to previous 1.23 (colored)

One less include.

Revision 1.23 / (download) - annotate - [select for diffs], Sat Oct 3 02:06:11 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.22: +20 -88 lines
Diff to previous 1.22 (colored)

Make this file a little bit smaller by collapsing cases.

Revision 1.22 / (download) - annotate - [select for diffs], Sat Oct 3 02:01:12 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.21: +3 -15 lines
Diff to previous 1.21 (colored)

Move clockctl policy exception back to the subsystem.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Oct 3 01:52:14 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.20: +9 -9 lines
Diff to previous 1.20 (colored)

secmodel_bsd44_curtain -> secmodel_suser_curtain (static).

Revision 1.20 / (download) - annotate - [select for diffs], Sat Oct 3 01:46:39 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.19: +2 -7 lines
Diff to previous 1.19 (colored)

Move default network interface policy back to the subsystem.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Oct 3 01:41:39 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.18: +8 -8 lines
Diff to previous 1.18 (colored)

Finish moving socket policy to the subsystem.

Revision 1.18 / (download) - annotate - [select for diffs], Sat Oct 3 01:30:25 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.17: +2 -31 lines
Diff to previous 1.17 (colored)

Move sched policy back to the subsystem.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Oct 3 00:37:01 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.16: +2 -21 lines
Diff to previous 1.16 (colored)

Move firewall/NAT policy back to respective subsystems (pf, ipf).

Note: the ipf code contains a lot of ifdefs, some of them for NetBSD
versions that are no longer maintained. It won't make the code more
readable, but we should consider removing them.

Revision 1.16 / (download) - annotate - [select for diffs], Sat Oct 3 00:14:07 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.15: +3 -8 lines
Diff to previous 1.15 (colored)

Move kevent policy back to the subsystem.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Oct 3 00:06:37 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.14: +3 -4 lines
Diff to previous 1.14 (colored)

Put module loading policy back in the subsystem.

Revisit: consider moving kauth_init() above module_init() in main().

Revision 1.14 / (download) - annotate - [select for diffs], Fri Oct 2 23:58:53 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.13: +3 -12 lines
Diff to previous 1.13 (colored)

Put the tty opening policy back in the subsystem.

Remove include we don't need from the secmodel code.

Revision 1.13 / (download) - annotate - [select for diffs], Fri Oct 2 23:50:16 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.12: +9 -36 lines
Diff to previous 1.12 (colored)

Move some of the socket policy back to the subsystem.

Remove include we don't need in the secmodel code.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Oct 2 23:24:15 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.11: +5 -10 lines
Diff to previous 1.11 (colored)

Put signal delivery policy back in the subsystem.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Oct 2 23:18:12 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.10: +2 -6 lines
Diff to previous 1.10 (colored)

Remove includes we don't need.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Oct 2 23:16:21 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.9: +3 -10 lines
Diff to previous 1.9 (colored)

Move routing socket security policy back to the subsystem.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Oct 2 23:06:33 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.8: +7 -23 lines
Diff to previous 1.8 (colored)

- Squeeze function declarations where possible,
- KAUTH_RESULT_DEFER is the default (set at the beginning of each listener)
  and as such does not need to be set explicitly in the switches.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Oct 2 23:00:02 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.7: +4 -29 lines
Diff to previous 1.7 (colored)

Put procfs policy back in the subsystem.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Oct 2 22:46:18 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.6: +3 -15 lines
Diff to previous 1.6 (colored)

Stick nice policy in its own subsystem and call the listener "resource"
rather than "rlimit"...

Revision 1.6 / (download) - annotate - [select for diffs], Fri Oct 2 22:38:45 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.5: +7 -63 lines
Diff to previous 1.5 (colored)

Move rlimit policy back to the subsystem.

For this we needed proc_uidmatch() exposed, which makes a lot of sense,
so put it back in sys_process.c for use in other places as well.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Oct 2 22:18:57 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.4: +4 -56 lines
Diff to previous 1.4 (colored)

Move ptrace's security policy back to the subsystem itself.

Add a ptrace_init() so we have a place to register the listener; called
next to ktrinit().

Revision 1.4 / (download) - annotate - [select for diffs], Fri Oct 2 22:05:52 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.3: +2 -13 lines
Diff to previous 1.3 (colored)

Let the ipkdb subsystem allow operations related to it rather than wrongly
doing so in the suser secmodel.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Oct 2 21:56:28 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.2: +3 -13 lines
Diff to previous 1.2 (colored)

Move psets security policy back to the subsystem and keep suser logic only
in the suser secmodel code.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Oct 2 21:47:35 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.1: +4 -26 lines
Diff to previous 1.1 (colored)

Move ktrace's subsystem security policy to the subsystem itself, and keep
just the suser-related logic in the suser secmodel.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Oct 2 18:50:13 2009 UTC (14 years, 4 months ago) by elad
Branch: MAIN

First part of secmodel cleanup and other misc. changes:

  - Separate the suser part of the bsd44 secmodel into its own secmodel
    and directory, pending even more cleanups. For revision history
    purposes, the original location of the files was

        src/sys/secmodel/bsd44/secmodel_bsd44_suser.c
        src/sys/secmodel/bsd44/suser.h

  - Add a man-page for secmodel_suser(9) and update the one for
    secmodel_bsd44(9).

  - Add a "secmodel" module class and use it. Userland program and
    documentation updated.

  - Manage secmodel count (nsecmodels) through the module framework.
    This eliminates the need for secmodel_{,de}register() calls in
    secmodel code.

  - Prepare for secmodel modularization by adding relevant module bits.
    The secmodels don't allow auto unload. The bsd44 secmodel depends
    on the suser and securelevel secmodels. The overlay secmodel depends
    on the bsd44 secmodel. As the module class is only cosmetic, and to
    prevent ambiguity, the bsd44 and overlay secmodels are prefixed with
    "secmodel_".

  - Adapt the overlay secmodel to recent changes (mainly vnode scope).

  - Stop using link-sets for the sysctl node(s) creation.

  - Keep sysctl variables under nodes of their relevant secmodels. In
    other words, don't create duplicates for the suser/securelevel
    secmodels under the bsd44 secmodel, as the latter is merely used
    for "grouping".

  - For the suser and securelevel secmodels, "advertise presence" in
    relevant sysctl nodes (sysctl.security.models.{suser,securelevel}).

  - Get rid of the LKM preprocessor stuff.

  - As secmodels are now modules, there's no need for an explicit call
    to secmodel_start(); it's handled by the module framework. That
    said, the module framework was adjusted to properly load secmodels
    early during system startup.

  - Adapt rump to changes: Instead of using empty stubs for securelevel,
    simply use the suser secmodel. Also replace secmodel_start() with a
    call to secmodel_suser_start().

  - 5.99.20.

Testing was done on i386 ("release" build). Spearated module_init()
changes were tested on sparc and sparc64 as well by martin@ (thanks!).

Mailing list reference:

	http://mail-index.netbsd.org/tech-kern/2009/09/25/msg006135.html

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>