The NetBSD Project

CVS log for src/sys/kern/kern_auth.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.84 / (download) - annotate - [select for diffs], Wed Oct 4 22:17:09 2023 UTC (6 months, 1 week ago) by ad
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.83: +5 -5 lines
Diff to previous 1.83 (colored) to selected 1.1.2.2 (colored)

kauth_cred_hold(): return cred verbatim so that donating a reference to
another data structure can be done more elegantly.

Revision 1.83 / (download) - annotate - [select for diffs], Mon Oct 2 20:59:12 2023 UTC (6 months, 2 weeks ago) by ad
Branch: MAIN
Changes since 1.82: +6 -6 lines
Diff to previous 1.82 (colored) to selected 1.1.2.2 (colored)

kauth_cred_groupmember(): check egid before a tedious scan of groups.

Revision 1.82 / (download) - annotate - [select for diffs], Fri Feb 24 11:02:27 2023 UTC (13 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.81: +2 -6 lines
Diff to previous 1.81 (colored) to selected 1.1.2.2 (colored)

kern: Eliminate most __HAVE_ATOMIC_AS_MEMBAR conditionals.

I'm leaving in the conditional around the legacy membar_enters
(store-before-load, store-before-store) in kern_mutex.c and in
kern_lock.c because they may still matter: store-before-load barriers
tend to be the most expensive kind, so eliding them is probably
worthwhile on x86.  (It also may not matter; I just don't care to do
measurements right now, and it's a single valid and potentially
justifiable use case in the whole tree.)

However, membar_release/acquire can be mere instruction barriers on
all TSO platforms including x86, so there's no need to go out of our
way with a bad API to conditionalize them.  If the procedure call
overhead is measurable we just could change them to be macros on x86
that expand into __insn_barrier.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/23/msg028729.html

Revision 1.81 / (download) - annotate - [select for diffs], Sat Apr 9 23:38:33 2022 UTC (2 years ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, 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
Changes since 1.80: +4 -4 lines
Diff to previous 1.80 (colored) to selected 1.1.2.2 (colored)

sys: Use membar_release/acquire around reference drop.

This just goes through my recent reference count membar audit and
changes membar_exit to membar_release and membar_enter to
membar_acquire -- this should make everything cheaper on most CPUs
without hurting correctness, because membar_acquire is generally
cheaper than membar_enter.

Revision 1.80 / (download) - annotate - [select for diffs], Sun Mar 27 16:23:08 2022 UTC (2 years ago) by christos
Branch: MAIN
Changes since 1.79: +21 -2 lines
Diff to previous 1.79 (colored) to selected 1.1.2.2 (colored)

Expose groupmember as kauth_cred_groupmember and use it.

Revision 1.79 / (download) - annotate - [select for diffs], Sat Mar 12 15:32:32 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.78: +8 -2 lines
Diff to previous 1.78 (colored) to selected 1.1.2.2 (colored)

sys: Membar audit around reference count releases.

If two threads are using an object that is freed when the reference
count goes to zero, we need to ensure that all memory operations
related to the object happen before freeing the object.

Using an atomic_dec_uint_nv(&refcnt) == 0 ensures that only one
thread takes responsibility for freeing, but it's not enough to
ensure that the other thread's memory operations happen before the
freeing.

Consider:

	  Thread A			  Thread B
	obj->foo = 42;			obj->baz = 73;
	mumble(&obj->bar);		grumble(&obj->quux);
	/* membar_exit(); */		/* membar_exit(); */
	atomic_dec -- not last		atomic_dec -- last
					/* membar_enter(); */
					KASSERT(invariant(obj->foo,
					    obj->bar));
					free_stuff(obj);

The memory barriers ensure that

	obj->foo = 42;
	mumble(&obj->bar);

in thread A happens before

	KASSERT(invariant(obj->foo, obj->bar));
	free_stuff(obj);

in thread B.  Without them, this ordering is not guaranteed.

So in general it is necessary to do

	membar_exit();
	if (atomic_dec_uint_nv(&obj->refcnt) != 0)
		return;
	membar_enter();

to release a reference, for the `last one out hit the lights' style
of reference counting.  (This is in contrast to the style where one
thread blocks new references and then waits under a lock for existing
ones to drain with a condvar -- no membar needed thanks to mutex(9).)

I searched for atomic_dec to find all these.  Obviously we ought to
have a better abstraction for this because there's so much copypasta.
This is a stop-gap measure to fix actual bugs until we have that.  It
would be nice if an abstraction could gracefully handle the different
styles of reference counting in use -- some years ago I drafted an
API for this, but making it cover everything got a little out of hand
(particularly with struct vnode::v_usecount) and I ended up setting
it aside to work on psref/localcount instead for better scalability.

I got bored of adding #ifdef __HAVE_ATOMIC_AS_MEMBAR everywhere, so I
only put it on things that look performance-critical on 5sec review.
We should really adopt membar_enter_preatomic/membar_exit_postatomic
or something (except they are applicable only to atomic r/m/w, not to
atomic_load/store_*, making the naming annoying) and get rid of all
the ifdefs.

Revision 1.78 / (download) - annotate - [select for diffs], Sat May 16 18:31:50 2020 UTC (3 years, 11 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, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.77: +9 -8 lines
Diff to previous 1.77 (colored) to selected 1.1.2.2 (colored)

Add ACL support for FFS. From FreeBSD.

Revision 1.76.10.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:03 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.76: +5 -5 lines
Diff to previous 1.76 (colored) next main 1.77 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD

Revision 1.76.8.1 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:41 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.76: +5 -5 lines
Diff to previous 1.76 (colored) next main 1.77 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD

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

Revision 1.77 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:35 2018 UTC (5 years, 7 months ago) by riastradh
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, 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-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, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.76: +5 -5 lines
Diff to previous 1.76 (colored) to selected 1.1.2.2 (colored)

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)

Revision 1.71.2.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:44 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.71.2.2: +66 -40 lines
Diff to previous 1.71.2.2 (colored) next main 1.72 (colored) to selected 1.1.2.2 (colored)

update from HEAD

Revision 1.73.14.3 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:07 2017 UTC (6 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.73.14.2: +3 -13 lines
Diff to previous 1.73.14.2 (colored) to branchpoint 1.73 (colored) next main 1.74 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD

Revision 1.76 / (download) - annotate - [select for diffs], Thu Jun 1 02:45:13 2017 UTC (6 years, 10 months ago) by chs
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, phil-wifi-base, pgoyette-compat-base, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, 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, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.75: +3 -13 lines
Diff to previous 1.75 (colored) to selected 1.1.2.2 (colored)

remove checks for failure after memory allocation calls that cannot fail:

  kmem_alloc() with KM_SLEEP
  kmem_zalloc() with KM_SLEEP
  percpu_alloc()
  pserialize_create()
  psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.

Revision 1.73.14.2 / (download) - annotate - [select for diffs], Sun Dec 27 12:10:05 2015 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.73.14.1: +3 -31 lines
Diff to previous 1.73.14.1 (colored) to branchpoint 1.73 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.75 / (download) - annotate - [select for diffs], Tue Oct 6 22:13:39 2015 UTC (8 years, 6 months ago) by christos
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, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Changes since 1.74: +3 -31 lines
Diff to previous 1.74 (colored) to selected 1.1.2.2 (colored)

Expose struct kauth_cred for the benefit of the debugger. I can't convince gcc
to produce debug info for the structure if it does not appear in more than
one source file.

Revision 1.73.14.1 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:07 2015 UTC (8 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.73: +66 -2 lines
Diff to previous 1.73 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD

Revision 1.74 / (download) - annotate - [select for diffs], Sat Aug 8 07:53:51 2015 UTC (8 years, 8 months ago) by mlelstv
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.73: +66 -2 lines
Diff to previous 1.73 (colored) to selected 1.1.2.2 (colored)

KASSERT that magic pointers NOCRED and FSCRED are not dereferenced.

Revision 1.65.12.3 / (download) - annotate - [select for diffs], Thu May 22 11:41:03 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.65.12.2: +2 -13 lines
Diff to previous 1.65.12.2 (colored) to branchpoint 1.65 (colored) next main 1.66 (colored) to selected 1.1.2.2 (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.71.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 06:18:57 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.71.2.1: +2 -13 lines
Diff to previous 1.71.2.1 (colored) to selected 1.1.2.2 (colored)

resync from head

Revision 1.73 / (download) - annotate - [select for diffs], Mon Mar 18 19:35:42 2013 UTC (11 years, 1 month ago) by plunky
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, rmind-smpnet, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, 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, khorben-n900, agc-symver-base, agc-symver
Branch point for: nick-nhusb
Changes since 1.72: +2 -13 lines
Diff to previous 1.72 (colored) to selected 1.1.2.2 (colored)

C99 section 6.7.2.3 (Tags) Note 3 states that:

  A type specifier of the form

	enum identifier

  without an enumerator list shall only appear after the type it
  specifies is complete.

which means that we cannot pass an "enum vtype" argument to
kauth_access_action() without fully specifying the type first.
Unfortunately there is a complicated include file loop which
makes that difficult, so convert this minimal function into a
macro (and capitalize it).

(ok elad@)

Revision 1.71.2.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:42 2012 UTC (11 years, 5 months ago) by tls
Branch: tls-maxphys
Changes since 1.71: +3 -3 lines
Diff to previous 1.71 (colored) to selected 1.1.2.2 (colored)

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

Revision 1.65.12.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:27 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.65.12.1: +9 -3 lines
Diff to previous 1.65.12.1 (colored) to branchpoint 1.65 (colored) to selected 1.1.2.2 (colored)

sync with head

Revision 1.72 / (download) - annotate - [select for diffs], Sun Sep 16 14:35:26 2012 UTC (11 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6
Changes since 1.71: +3 -3 lines
Diff to previous 1.71 (colored) to selected 1.1.2.2 (colored)

PR/46973: Dr. Wolfgang Stukenbrock: kauth_authorize_action_internal() returns
non-macro value as it should do

Revision 1.71 / (download) - annotate - [select for diffs], Wed Jun 27 12:28:28 2012 UTC (11 years, 9 months ago) by cheusov
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.70: +8 -2 lines
Diff to previous 1.70 (colored) to selected 1.1.2.2 (colored)


Add new action KAUTH_CRED_CHROOT for kauth(9)'s credential scope.
Reviewed and approved by elad@.

Revision 1.70 / (download) - annotate - [select for diffs], Wed Jun 27 10:06:55 2012 UTC (11 years, 9 months ago) by cheusov
Branch: MAIN
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored) to selected 1.1.2.2 (colored)

KNF fix. space vs. tab

Revision 1.69 / (download) - annotate - [select for diffs], Wed Jun 27 10:02:02 2012 UTC (11 years, 9 months ago) by cheusov
Branch: MAIN
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored) to selected 1.1.2.2 (colored)

Fix a typo. s/seperate/separate/

Revision 1.65.12.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:22 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.65: +31 -53 lines
Diff to previous 1.65 (colored) to selected 1.1.2.2 (colored)

sync with head

Revision 1.65.16.2 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:38 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.65.16.1: +26 -28 lines
Diff to previous 1.65.16.1 (colored) to branchpoint 1.65 (colored) next main 1.66 (colored) to selected 1.1.2.2 (colored)

sync to latest -current.

Revision 1.68 / (download) - annotate - [select for diffs], Tue Mar 13 18:40:52 2012 UTC (12 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base10
Changes since 1.67: +26 -2 lines
Diff to previous 1.67 (colored) to selected 1.1.2.2 (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.67 / (download) - annotate - [select for diffs], Tue Mar 13 18:36:49 2012 UTC (12 years, 1 month ago) by elad
Branch: MAIN
Changes since 1.66: +2 -28 lines
Diff to previous 1.66 (colored) to selected 1.1.2.2 (colored)

Remove TNF license.

Revision 1.65.16.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:27 2012 UTC (12 years, 2 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.65: +7 -27 lines
Diff to previous 1.65 (colored) to selected 1.1.2.2 (colored)

merge to -current.

Revision 1.66 / (download) - annotate - [select for diffs], Sun Dec 4 19:24:58 2011 UTC (12 years, 4 months ago) by jym
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.65: +7 -27 lines
Diff to previous 1.65 (colored) to selected 1.1.2.2 (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.59.2.5 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:16 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.59.2.4: +4 -3 lines
Diff to previous 1.59.2.4 (colored) to branchpoint 1.59 (colored) next main 1.60 (colored) to selected 1.1.2.2 (colored)

sync with head

Revision 1.65 / (download) - annotate - [select for diffs], Thu Dec 31 02:20:36 2009 UTC (14 years, 3 months 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-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.64: +4 -3 lines
Diff to previous 1.64 (colored) to selected 1.1.2.2 (colored)

Tiny cosmetics...

Revision 1.59.2.4 / (download) - annotate - [select for diffs], Wed Sep 16 13:38:00 2009 UTC (14 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.59.2.3: +79 -8 lines
Diff to previous 1.59.2.3 (colored) to branchpoint 1.59 (colored) to selected 1.1.2.2 (colored)

sync with head

Revision 1.64 / (download) - annotate - [select for diffs], Thu Sep 3 04:45:27 2009 UTC (14 years, 7 months ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, matt-premerge-20091211, jym-xensuspend-nbase
Changes since 1.63: +79 -8 lines
Diff to previous 1.63 (colored) to selected 1.1.2.2 (colored)

Implement the vnode scope and adapt tmpfs to use it.

Mailing list reference:

	http://mail-index.netbsd.org/tech-kern/2009/07/04/msg005404.html

Revision 1.59.2.3 / (download) - annotate - [select for diffs], Wed Aug 19 18:48:16 2009 UTC (14 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.59.2.2: +3 -2 lines
Diff to previous 1.59.2.2 (colored) to branchpoint 1.59 (colored) to selected 1.1.2.2 (colored)

sync with head.

Revision 1.63 / (download) - annotate - [select for diffs], Sun Aug 16 11:01:12 2009 UTC (14 years, 8 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7
Changes since 1.62: +3 -2 lines
Diff to previous 1.62 (colored) to selected 1.1.2.2 (colored)

kauth_cred_free: add an assertion.

Revision 1.61.8.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:56 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.61: +4 -4 lines
Diff to previous 1.61 (colored) next main 1.62 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.59.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:46 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.59.2.1: +6 -7 lines
Diff to previous 1.59.2.1 (colored) to branchpoint 1.59 (colored) to selected 1.1.2.2 (colored)

sync with head.

Revision 1.61.2.1 / (download) - annotate - [select for diffs], Tue Apr 28 07:36:59 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.61: +4 -4 lines
Diff to previous 1.61 (colored) next main 1.62 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD.

Revision 1.62 / (download) - annotate - [select for diffs], Sun Apr 5 11:50:51 2009 UTC (15 years ago) by lukem
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-base
Changes since 1.61: +4 -4 lines
Diff to previous 1.61 (colored) to selected 1.1.2.2 (colored)

fix sign-compare issues

Revision 1.60.6.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:27 2008 UTC (15 years, 6 months ago) by haad
Branch: haad-dm
Changes since 1.60: +4 -5 lines
Diff to previous 1.60 (colored) next main 1.61 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD.

Revision 1.57.6.3 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:52 2008 UTC (15 years, 6 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.57.6.2: +2 -3 lines
Diff to previous 1.57.6.2 (colored) to branchpoint 1.57 (colored) next main 1.58 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD.

Revision 1.60.2.1 / (download) - annotate - [select for diffs], Thu Sep 18 04:31:41 2008 UTC (15 years, 7 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.60: +4 -5 lines
Diff to previous 1.60 (colored) next main 1.61 (colored) to selected 1.1.2.2 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.61 / (download) - annotate - [select for diffs], Fri Aug 15 01:31:02 2008 UTC (15 years, 8 months ago) by matt
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, nick-hppapmap-base2, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs2-base, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, jym-xensuspend
Changes since 1.60: +4 -5 lines
Diff to previous 1.60 (colored) to selected 1.1.2.2 (colored)

Use __arraycount when appropriate

Revision 1.57.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:07 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.57.6.1: +2 -9 lines
Diff to previous 1.57.6.1 (colored) to branchpoint 1.57 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD.

Revision 1.58.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:06 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-pf42
Changes since 1.58: +4 -11 lines
Diff to previous 1.58 (colored) next main 1.59 (colored) to selected 1.1.2.2 (colored)

sync with head.

Revision 1.59.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:24 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.59: +2 -9 lines
Diff to previous 1.59 (colored) to selected 1.1.2.2 (colored)

sync with head.

Revision 1.60 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:02 2008 UTC (15 years, 11 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa, haad-dm
Changes since 1.59: +2 -9 lines
Diff to previous 1.59 (colored) to selected 1.1.2.2 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.59 / (download) - annotate - [select for diffs], Thu Apr 24 18:39:23 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.58: +4 -4 lines
Diff to previous 1.58 (colored) to selected 1.1.2.2 (colored)

Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.

Revision 1.57.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:00 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.57: +6 -4 lines
Diff to previous 1.57 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD.

Revision 1.58 / (download) - annotate - [select for diffs], Thu Mar 27 18:30:15 2008 UTC (16 years ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.57: +6 -4 lines
Diff to previous 1.57 (colored) to selected 1.1.2.2 (colored)

Replace use of CACHE_LINE_SIZE in some obvious places.

Revision 1.51.8.4 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:58 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.51.8.3: +2 -5 lines
Diff to previous 1.51.8.3 (colored) to branchpoint 1.51 (colored) next main 1.52 (colored) to selected 1.1.2.2 (colored)

sync with HEAD

Revision 1.8.4.9 / (download) - annotate - [select for diffs], Wed Feb 27 08:36:54 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.8.4.8: +2 -5 lines
Diff to previous 1.8.4.8 (colored) to branchpoint 1.8 (colored) next main 1.9 (colored) to selected 1.1.2.2 (colored)

sync with head.

Revision 1.52.6.3 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:45 2008 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.52.6.2: +2 -5 lines
Diff to previous 1.52.6.2 (colored) to branchpoint 1.52 (colored) next main 1.53 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD.

Revision 1.57 / (download) - annotate - [select for diffs], Thu Feb 14 15:01:45 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: mjf-devfs2
Changes since 1.56: +2 -5 lines
Diff to previous 1.56 (colored) to selected 1.1.2.2 (colored)

Remove 'contributed to' text from the TNF license on this file, so that
it can not be complained about.

Revision 1.51.8.3 / (download) - annotate - [select for diffs], Wed Jan 9 01:55:58 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.51.8.2: +51 -45 lines
Diff to previous 1.51.8.2 (colored) to branchpoint 1.51 (colored) to selected 1.1.2.2 (colored)

sync with HEAD

Revision 1.52.6.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:20:25 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.52.6.1: +49 -43 lines
Diff to previous 1.52.6.1 (colored) to branchpoint 1.52 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD.

Revision 1.8.4.8 / (download) - annotate - [select for diffs], Fri Dec 7 17:32:37 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.8.4.7: +49 -43 lines
Diff to previous 1.8.4.7 (colored) to branchpoint 1.8 (colored) to selected 1.1.2.2 (colored)

sync with head

Revision 1.51.6.4 / (download) - annotate - [select for diffs], Mon Dec 3 16:14:47 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.51.6.3: +49 -43 lines
Diff to previous 1.51.6.3 (colored) to branchpoint 1.51 (colored) next main 1.52 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD.

Revision 1.56 / (download) - annotate - [select for diffs], Thu Nov 29 19:50:28 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, matt-armv6-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-nbase, bouyer-xeni386-merge1, bouyer-xeni386-base, bouyer-xeni386
Changes since 1.55: +4 -4 lines
Diff to previous 1.55 (colored) to selected 1.1.2.2 (colored)

Fix minor error in previous.

Revision 1.55 / (download) - annotate - [select for diffs], Thu Nov 29 17:48:27 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.54: +49 -43 lines
Diff to previous 1.54 (colored) to selected 1.1.2.2 (colored)

Use atomics to adjust the credential reference count.

Revision 1.52.6.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:48:34 2007 UTC (16 years, 5 months ago) by mjf
Branch: mjf-devfs
Changes since 1.52: +52 -18 lines
Diff to previous 1.52 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD.

Revision 1.8.4.7 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:38 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.8.4.6: +52 -18 lines
Diff to previous 1.8.4.6 (colored) to branchpoint 1.8 (colored) to selected 1.1.2.2 (colored)

sync with head.

Revision 1.51.6.3 / (download) - annotate - [select for diffs], Wed Nov 14 19:04:39 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.51.6.2: +4 -4 lines
Diff to previous 1.51.6.2 (colored) to branchpoint 1.51 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD.

Revision 1.52.4.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:01:55 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.52: +50 -16 lines
Diff to previous 1.52 (colored) next main 1.53 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD

Revision 1.54 / (download) - annotate - [select for diffs], Sun Nov 11 23:22:23 2007 UTC (16 years, 5 months ago) by matt
Branch: MAIN
CVS Tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.53: +4 -4 lines
Diff to previous 1.53 (colored) to selected 1.1.2.2 (colored)

Change some initialization of static queues to compile time.
(xxx_INIT to xxx_HEAD_INITIALIZER).  Drop code which inits
non-auto (global or static) variables to 0 since that's
already implied by being non-auto.  Init some static/global
cpu_simple_locks at compile time.

Revision 1.51.6.2 / (download) - annotate - [select for diffs], Sun Nov 11 16:47:58 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.51.6.1: +50 -16 lines
Diff to previous 1.51.6.1 (colored) to branchpoint 1.51 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD.

Revision 1.51.8.2 / (download) - annotate - [select for diffs], Thu Nov 8 10:59:59 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.51.8.1: +50 -16 lines
Diff to previous 1.51.8.1 (colored) to branchpoint 1.51 (colored) to selected 1.1.2.2 (colored)

sync with -HEAD

Revision 1.53 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:20 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.52: +50 -16 lines
Diff to previous 1.52 (colored) to selected 1.1.2.2 (colored)

Merge from vmlocking:

- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.

Revision 1.51.8.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:31:29 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
Changes since 1.51: +7 -7 lines
Diff to previous 1.51 (colored) to selected 1.1.2.2 (colored)

sync with HEAD

Revision 1.8.4.6 / (download) - annotate - [select for diffs], Sat Oct 27 11:35:20 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.8.4.5: +7 -7 lines
Diff to previous 1.8.4.5 (colored) to branchpoint 1.8 (colored) to selected 1.1.2.2 (colored)

sync with head.

Revision 1.46.4.5 / (download) - annotate - [select for diffs], Tue Oct 9 13:44:23 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.46.4.4: +7 -7 lines
Diff to previous 1.46.4.4 (colored) to branchpoint 1.46 (colored) next main 1.47 (colored) to selected 1.1.2.2 (colored)

Sync with head.

Revision 1.51.6.1 / (download) - annotate - [select for diffs], Tue Oct 2 18:28:57 2007 UTC (16 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.51: +7 -7 lines
Diff to previous 1.51 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD.

Revision 1.52 / (download) - annotate - [select for diffs], Sun Sep 23 16:00:08 2007 UTC (16 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, jmcneill-base
Branch point for: mjf-devfs, bouyer-xenamd64
Changes since 1.51: +7 -7 lines
Diff to previous 1.51 (colored) to selected 1.1.2.2 (colored)

use a correct type for UIO_*.

Revision 1.8.4.5 / (download) - annotate - [select for diffs], Mon Sep 3 14:40:42 2007 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.8.4.4: +74 -18 lines
Diff to previous 1.8.4.4 (colored) to branchpoint 1.8 (colored) to selected 1.1.2.2 (colored)

sync with head.

Revision 1.46.4.4 / (download) - annotate - [select for diffs], Sat Sep 1 12:57:52 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.46.4.3: +50 -11 lines
Diff to previous 1.46.4.3 (colored) to branchpoint 1.46 (colored) to selected 1.1.2.2 (colored)

Use pool_cache for allocating a few more types of objects.

Revision 1.46.4.3 / (download) - annotate - [select for diffs], Sun Jul 15 13:27:36 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.46.4.2: +73 -17 lines
Diff to previous 1.46.4.2 (colored) to branchpoint 1.46 (colored) to selected 1.1.2.2 (colored)

Sync with head.

Revision 1.47.2.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:09:42 2007 UTC (16 years, 9 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.47: +73 -17 lines
Diff to previous 1.47 (colored) next main 1.48 (colored) to selected 1.1.2.2 (colored)

Sync with head.

Revision 1.51 / (download) - annotate - [select for diffs], Fri Jul 6 17:33:31 2007 UTC (16 years, 9 months ago) by dsl
Branch: MAIN
CVS Tags: nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: matt-armv6, jmcneill-pm
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored) to selected 1.1.2.2 (colored)

Fix the other inverted test as well.

Revision 1.50 / (download) - annotate - [select for diffs], Fri Jul 6 17:27:49 2007 UTC (16 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.49: +3 -3 lines
Diff to previous 1.49 (colored) to selected 1.1.2.2 (colored)

Fix intverted test, should fix nfs and hp700 issues.

Revision 1.49 / (download) - annotate - [select for diffs], Sat Jun 30 13:32:14 2007 UTC (16 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.48: +39 -41 lines
Diff to previous 1.48 (colored) to selected 1.1.2.2 (colored)

Add a flags parameter to kauth_cred_get/setgroups() so that sys_set/setgroups
can copy directly to/from userspace.
Avoids exposing the implementation of the group list as an array to code
outside kern_auth.c.
compat code and man page need updating.

Revision 1.48 / (download) - annotate - [select for diffs], Sat Jun 23 09:02:12 2007 UTC (16 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.47: +62 -4 lines
Diff to previous 1.47 (colored) to selected 1.1.2.2 (colored)

Simplify the interfaces needed for sys_setgroups() and sys_getgroups().
Exposed that the kauth code holds groups in an array, but removes some
of the knowledge of the maximum number of groups.
Allows the syscall code to copyin/out directly to/from the cred structure,
this save a lot of faffing about with malloc/free even when compat code
has to use 16bit groups.

Revision 1.44.2.2 / (download) - annotate - [select for diffs], Sat Mar 24 14:56:00 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.44.2.1: +3 -3 lines
Diff to previous 1.44.2.1 (colored) to branchpoint 1.44 (colored) next main 1.45 (colored) to selected 1.1.2.2 (colored)

sync with head.

Revision 1.46.4.2 / (download) - annotate - [select for diffs], Wed Mar 21 20:10:19 2007 UTC (17 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.46.4.1: +2 -7 lines
Diff to previous 1.46.4.1 (colored) to branchpoint 1.46 (colored) to selected 1.1.2.2 (colored)

GC the simplelock/spinlock debugging stuff.

Revision 1.46.4.1 / (download) - annotate - [select for diffs], Tue Mar 13 16:51:51 2007 UTC (17 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored) to selected 1.1.2.2 (colored)

Sync with head.

Revision 1.47 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:32 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored) to selected 1.1.2.2 (colored)

Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.44.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:18 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.44: +30 -8 lines
Diff to previous 1.44 (colored) to selected 1.1.2.2 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.8.4.4 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:04 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.8.4.3: +193 -46 lines
Diff to previous 1.8.4.3 (colored) to branchpoint 1.8 (colored) to selected 1.1.2.2 (colored)

sync with head.

Revision 1.46 / (download) - annotate - [select for diffs], Sat Feb 24 20:41:33 2007 UTC (17 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Branch point for: vmlocking
Changes since 1.45: +26 -5 lines
Diff to previous 1.45 (colored) to selected 1.1.2.2 (colored)

Revert the kauth_impl.h change. Elad is going to maintain this. Asked by core@

Revision 1.45 / (download) - annotate - [select for diffs], Sun Feb 18 15:20:34 2007 UTC (17 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.44: +6 -5 lines
Diff to previous 1.44 (colored) to selected 1.1.2.2 (colored)

The pre-kauth 'struct ucread' and 'struct pcred' are now only used in the
(depracted some time ago) 'struct kinfo_proc' returned by sysctl.
Move the definitions to sys/syctl.h and rename in order to ensure all the
users are located.

Revision 1.44 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:30 2007 UTC (17 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Branch point for: yamt-idlelwp
Changes since 1.43: +44 -49 lines
Diff to previous 1.43 (colored) to selected 1.1.2.2 (colored)

Merge newlock2 to head.

Revision 1.18.2.7 / (download) - annotate - [select for diffs], Fri Feb 9 21:03:53 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.18.2.6: +2 -2 lines
Diff to previous 1.18.2.6 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored) to selected 1.1.2.2 (colored)

Sync with HEAD.

Revision 1.18.2.6 / (download) - annotate - [select for diffs], Fri Feb 9 20:15:34 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.18.2.5: +5 -22 lines
Diff to previous 1.18.2.5 (colored) to branchpoint 1.18 (colored) to selected 1.1.2.2 (colored)

Split the definition of "struct kauth_cred" out into sys/kauth_impl.h.

Ok core@.

Revision 1.43 / (download) - annotate - [select for diffs], Wed Feb 7 08:04:48 2007 UTC (17 years, 2 months ago) by elad
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Changes since 1.42: +6 -2 lines
Diff to previous 1.42 (colored) to selected 1.1.2.2 (colored)

Add comment referring to kvm_proc.c.

Revision 1.18.2.5 / (download) - annotate - [select for diffs], Mon Feb 5 13:53:20 2007 UTC (17 years, 2 months ago) by yamt
Branch: newlock2
Changes since 1.18.2.4: +3 -2 lines
Diff to previous 1.18.2.4 (colored) to branchpoint 1.18 (colored) to selected 1.1.2.2 (colored)

kauth_cred_free: don't forget to destroy mutex.

Revision 1.18.2.4 / (download) - annotate - [select for diffs], Sun Feb 4 12:10:56 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.18.2.3: +40 -25 lines
Diff to previous 1.18.2.3 (colored) to branchpoint 1.18 (colored) to selected 1.1.2.2 (colored)

Replace simplelocks.

XXX Needs thought, as kauth complicates lock ordering slightly, and has
complications surrounding the lifetime of credentials if listeners are
permitted to sleep.

Revision 1.18.2.3 / (download) - annotate - [select for diffs], Thu Feb 1 08:48:37 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.18.2.2: +144 -17 lines
Diff to previous 1.18.2.2 (colored) to branchpoint 1.18 (colored) to selected 1.1.2.2 (colored)

Sync with head.

Revision 1.42 / (download) - annotate - [select for diffs], Wed Jan 31 16:30:09 2007 UTC (17 years, 2 months ago) by elad
Branch: MAIN
Changes since 1.41: +6 -3 lines
Diff to previous 1.41 (colored) to selected 1.1.2.2 (colored)

Fix notify only logic for credentials scope. Thanks ad@!

Revision 1.41 / (download) - annotate - [select for diffs], Wed Jan 31 10:08:23 2007 UTC (17 years, 2 months ago) by elad
Branch: MAIN
Changes since 1.40: +104 -4 lines
Diff to previous 1.40 (colored) to selected 1.1.2.2 (colored)

Add a new scope, the credentials scope, which is internal to the kauth(9)
implementation and meant to be used by security models to hook credential
related operations (init, fork, copy, free -- hooked in kauth_cred_alloc(),
kauth_proc_fork(), kauth_cred_clone(), and kauth_cred_free(), respectively)
and document it.

Add specificdata to credentials, and routines to register/deregister new
"keys", as well as set/get routines. This allows security models to add
their own private data to a kauth_cred_t.

The above two, combined, allow security models to control inheritance of
their own private data in credentials which is a requirement for doing
stuff like, I dunno, capabilities?

Revision 1.40 / (download) - annotate - [select for diffs], Fri Jan 26 23:50:36 2007 UTC (17 years, 2 months ago) by elad
Branch: MAIN
Changes since 1.39: +2 -5 lines
Diff to previous 1.39 (colored) to selected 1.1.2.2 (colored)

No need to include acct.h, sysctl.h, and time.h.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Jan 16 11:51:22 2007 UTC (17 years, 3 months ago) by elad
Branch: MAIN
Changes since 1.38: +30 -12 lines
Diff to previous 1.38 (colored) to selected 1.1.2.2 (colored)

Introduce secmodel_register() and secmodel_deregister() (for now left
undocumented) and change logic in kauth_authorize_action() to only
allow an action if it wasn't explicitly allowed/denied and there are no
secmodels loaded.

Okay yamt@.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Jan 15 17:45:32 2007 UTC (17 years, 3 months ago) by elad
Branch: MAIN
Changes since 1.37: +11 -2 lines
Diff to previous 1.37 (colored) to selected 1.1.2.2 (colored)

Introduce kauth_proc_fork() to control credential inheritance.

Revision 1.18.2.2 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:06 2007 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.18.2.1: +45 -25 lines
Diff to previous 1.18.2.1 (colored) to branchpoint 1.18 (colored) to selected 1.1.2.2 (colored)

Sync with head.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Jan 9 12:49:36 2007 UTC (17 years, 3 months ago) by elad
Branch: MAIN
Changes since 1.36: +3 -6 lines
Diff to previous 1.36 (colored) to selected 1.1.2.2 (colored)

Remove advertising clause from all of my stuff.

Revision 1.32.2.4 / (download) - annotate - [select for diffs], Sun Jan 7 10:51:15 2007 UTC (17 years, 3 months ago) by bouyer
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.32.2.3: +28 -16 lines
Diff to previous 1.32.2.3 (colored) to branchpoint 1.32 (colored) next main 1.33 (colored) to selected 1.1.2.2 (colored)

Pull up following revision(s) (requested by elad in ticket #339):
	sys/kern/kern_auth.c: revision 1.34
Allocate space for scopes and listeners with kmem. Ok elad@.

Revision 1.32.2.3 / (download) - annotate - [select for diffs], Sat Jan 6 13:27:00 2007 UTC (17 years, 3 months ago) by bouyer
Branch: netbsd-4
Changes since 1.32.2.2: +4 -2 lines
Diff to previous 1.32.2.2 (colored) to branchpoint 1.32 (colored) to selected 1.1.2.2 (colored)

Pull up following revision(s) (requested by elad in ticket #322):
	share/man/man9/kauth.9: revision 1.44
	sys/kern/kern_auth.c: revision 1.36
Make kauth_deregister_scope() and kauth_unlisten_scope() free the
passed kauth_scope_t and kauth_listener_t objects, respectively.
Okay yamt@.

Revision 1.32.2.2 / (download) - annotate - [select for diffs], Sat Jan 6 13:18:17 2007 UTC (17 years, 3 months ago) by bouyer
Branch: netbsd-4
Changes since 1.32.2.1: +2 -2 lines
Diff to previous 1.32.2.1 (colored) to branchpoint 1.32 (colored) to selected 1.1.2.2 (colored)

Pull up following revision(s) (requested by elad in ticket #316):
	share/examples/secmodel/secmodel_example.c: revision 1.10 via patch
	sys/arch/i386/i386/sys_machdep.c: revision 1.79
	sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.31
	share/man/man9/secmodel_bsd44.9: revision 1.9
	sys/arch/vax/vax/mem.c: revision 1.34 via patch
	sys/arch/sh3/sh3/mem.c: revision 1.23 via patch
	sys/arch/sh5/sh5/mem.c: revision 1.14 via patch
	sys/secmodel/bsd44/secmodel_bsd44_suser.c: revision 1.22 via patch
	sys/arch/powerpc/powerpc/mem.c: revision 1.27 via patch
	sys/arch/x86/x86/x86_machdep.c: revision 1.5
	sys/arch/alpha/alpha/machdep.c: revision 1.291
	sys/arch/arm/arm32/mem.c: revision 1.17 via patch
	sys/secmodel/bsd44/secmodel_bsd44_securelevel.c: revision 1.20
	sys/sys/kauth.h: revision 1.29 via patch
	sys/arch/amd64/amd64/sys_machdep.c: revision 1.10
	share/man/man9/kauth.9: revision 1.43 via patch
	sys/arch/xen/i386/sys_machdep.c: revision 1.10
	sys/kern/kern_auth.c: revision 1.35
	sys/arch/pc532/pc532/mem.c: revision 1.43 via patch
Make machdep scope architecture-agnostic by removing all arch-specific
requests and centralizing them all. The result is that some of these
are not used on some architectures, but the documentation was updated
to reflect that.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Jan 1 23:33:03 2007 UTC (17 years, 3 months ago) by elad
Branch: MAIN
Changes since 1.35: +4 -2 lines
Diff to previous 1.35 (colored) to selected 1.1.2.2 (colored)

Make kauth_deregister_scope() and kauth_unlisten_scope() free the
passed kauth_scope_t and kauth_listener_t objects, respectively.

Okay yamt@.

Revision 1.8.4.3 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:05 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.8.4.2: +204 -158 lines
Diff to previous 1.8.4.2 (colored) to branchpoint 1.8 (colored) to selected 1.1.2.2 (colored)

sync with head.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Dec 26 10:43:44 2006 UTC (17 years, 3 months ago) by elad
Branch: MAIN
Changes since 1.34: +4 -4 lines
Diff to previous 1.34 (colored) to selected 1.1.2.2 (colored)

Make machdep scope architecture-agnostic by removing all arch-specific
requests and centralizing them all. The result is that some of these
are not used on some architectures, but the documentation was updated
to reflect that.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Dec 23 08:38:00 2006 UTC (17 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.33: +28 -16 lines
Diff to previous 1.33 (colored) to selected 1.1.2.2 (colored)

Allocate space for scopes and listeners with kmem. Ok elad@.

Revision 1.22.2.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:18:43 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.22.2.1: +52 -15 lines
Diff to previous 1.22.2.1 (colored) to branchpoint 1.22 (colored) next main 1.23 (colored) to selected 1.1.2.2 (colored)

sync with head.

Revision 1.32.2.1 / (download) - annotate - [select for diffs], Mon Dec 4 18:34:16 2006 UTC (17 years, 4 months ago) by tron
Branch: netbsd-4
Changes since 1.32: +6 -5 lines
Diff to previous 1.32 (colored) to selected 1.1.2.2 (colored)

Pull up following revision(s) (requested by elad in ticket #247):
	sys/dev/ic/dpt.c: revision 1.55
	sys/dev/pci/amr.c: revision 1.43
	sys/secmodel/bsd44/secmodel_bsd44_securelevel.c: revision 1.19
	sys/dev/pci/mly.c: revision 1.33
	share/man/man9/kauth.9: revision 1.37
	sys/dev/ic/mlx.c: revision 1.49
	sys/dev/ic/icp_ioctl.c: revision 1.14
	sys/dev/i2o/iop.c: revision 1.62
	sys/dev/pci/twe.c: revision 1.82
	sys/sys/kauth.h: revision 1.25
	sys/dev/i2o/dpti.c: revision 1.31
	sys/kern/kern_auth.c: revision 1.33
	sys/dev/tc/stic.c: revision 1.37
Change kauth(9) KPI for kauth_authorize_device_passthru() to add another
argument, u_long, serving as a bit-mask of generic requests for the
passthru request.
Discussed on tech-security@ and tech-kern@. Okay tls@.

Revision 1.33 / (download) - annotate - [select for diffs], Sat Dec 2 03:10:43 2006 UTC (17 years, 4 months ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3
Changes since 1.32: +6 -5 lines
Diff to previous 1.32 (colored) to selected 1.1.2.2 (colored)

Change kauth(9) KPI for kauth_authorize_device_passthru() to add another
argument, u_long, serving as a bit-mask of generic requests for the
passthru request.

Discussed on tech-security@ and tech-kern@. Okay tls@.

Revision 1.32 / (download) - annotate - [select for diffs], Sun Nov 19 00:11:29 2006 UTC (17 years, 5 months ago) by elad
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.31: +10 -2 lines
Diff to previous 1.31 (colored) to selected 1.1.2.2 (colored)

Provide a standard authorization wrapper for the device scope.

Revision 1.18.2.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:21 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.18: +118 -125 lines
Diff to previous 1.18 (colored) to selected 1.1.2.2 (colored)

Sync with head.

Revision 1.31 / (download) - annotate - [select for diffs], Sat Nov 4 09:30:00 2006 UTC (17 years, 5 months ago) by elad
Branch: MAIN
Changes since 1.30: +18 -2 lines
Diff to previous 1.30 (colored) to selected 1.1.2.2 (colored)

Change KAUTH_SYSTEM_RAWIO to KAUTH_DEVICE_RAWIO_SPEC (moving the raw i/o
requests to the device scope) and add KAUTH_DEVICE_RAWIO_PASSTHRU.

Expose iskmemdev() through sys/conf.h.

okay yamt@

Revision 1.30 / (download) - annotate - [select for diffs], Wed Nov 1 10:17:58 2006 UTC (17 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.29: +4 -5 lines
Diff to previous 1.29 (colored) to selected 1.1.2.2 (colored)

remove some __unused from function parameters.

Revision 1.29 / (download) - annotate - [select for diffs], Sun Oct 22 13:07:15 2006 UTC (17 years, 6 months ago) by pooka
Branch: MAIN
Changes since 1.28: +25 -7 lines
Diff to previous 1.28 (colored) to selected 1.1.2.2 (colored)

kauth_cred_uucvt() -> kauth_uucred_to_cred(), introduce kauth_cred_to_uucred()

per tech-kern proposal

Revision 1.28 / (download) - annotate - [select for diffs], Sun Oct 22 10:37:19 2006 UTC (17 years, 6 months ago) by elad
Branch: MAIN
Changes since 1.27: +2 -7 lines
Diff to previous 1.27 (colored) to selected 1.1.2.2 (colored)

Remove todo that has been documented for a long time now.

Revision 1.22.2.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:10 2006 UTC (17 years, 6 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.22: +26 -13 lines
Diff to previous 1.22 (colored) to selected 1.1.2.2 (colored)

sync with head

Revision 1.27 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:14 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.26: +5 -4 lines
Diff to previous 1.26 (colored) to selected 1.1.2.2 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.26 / (download) - annotate - [select for diffs], Mon Oct 2 16:29:57 2006 UTC (17 years, 6 months ago) by elad
Branch: MAIN
Changes since 1.25: +6 -7 lines
Diff to previous 1.25 (colored) to selected 1.1.2.2 (colored)

Move the kauth_init() call above auto-configuration; this will fix some
recent bugs introduced with the usage of kauth(9) in MD/device code.

While here, change the sanity checks to KASSERT(), because they're really
bugs we should fix if triggered.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Sep 30 20:05:57 2006 UTC (17 years, 6 months ago) by elad
Branch: MAIN
Changes since 1.24: +15 -2 lines
Diff to previous 1.24 (colored) to selected 1.1.2.2 (colored)

Implement the "device" scope.

It uses an authorization wrapper per device class on the system to
ensure type-safety.

For now, it supports only terminal (TTY) devices, and has two actions
for them: "open terminal" and "privileged set". Sample usage has been
added to i386 and hp300 code for reference.

Update documentation.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Sep 19 22:03:11 2006 UTC (17 years, 7 months ago) by elad
Branch: MAIN
Changes since 1.23: +4 -4 lines
Diff to previous 1.23 (colored) to selected 1.1.2.2 (colored)

Lose (void *) casts on the machdep scope authorization wrapper. Update
documentation.

Revision 1.23 / (download) - annotate - [select for diffs], Tue Sep 19 21:42:29 2006 UTC (17 years, 7 months ago) by elad
Branch: MAIN
Changes since 1.22: +4 -4 lines
Diff to previous 1.22 (colored) to selected 1.1.2.2 (colored)

Remove ugly (void *) casts from network scope authorization wrapper and
calls to it.

While here, adapt code for system scope listeners to avoid some more
casts (forgotten in previous run).

Update documentation.

Revision 1.22 / (download) - annotate - [select for diffs], Fri Sep 15 14:28:04 2006 UTC (17 years, 7 months ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base
Branch point for: yamt-splraiseipl
Changes since 1.21: +10 -4 lines
Diff to previous 1.21 (colored) to selected 1.1.2.2 (colored)

Introduce a new flag we mark as TRUE when we load listeners, and change
the logic in kauth_authorize_action() to use it.

When we try to authorize a request and the flag is FALSE, it means a
kernel was compiled with no listeners (or we're in very early boot stages),
and we always allow the request because it's likely to be coming from the
kernel itself or from loading an LKM with the security model (later on).

Assert that if the "listeners have been loaded" flag is FALSE, there are
really no listeners for the scope we're authorizing on.

When the flag is TRUE (ie., listeners have been loaded) but they were
later removed, creating a scope with no listeners, the request will be
denied further down.

This allows us to have the security model compiled outside the NetBSD
kernel and later loaded as an LKM, without fearing an attack will just
remove listeners we loaded earlier to create a "fail open" situation.

Input from yamt@, thorpej@, gdt@, dan@.
Okay yamt@, thorpej@.

Revision 1.3.2.6 / (download) - annotate - [select for diffs], Thu Sep 14 12:31:48 2006 UTC (17 years, 7 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.3.2.5: +54 -108 lines
Diff to previous 1.3.2.5 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored) to selected 1.1.2.2 (colored)

sync with head.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Sep 14 11:37:07 2006 UTC (17 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base9
Changes since 1.20: +8 -4 lines
Diff to previous 1.20 (colored) to selected 1.1.2.2 (colored)

kauth_register_scope: don't leak a listener
when no default listener is specified.

Revision 1.20.2.2 / (download) - annotate - [select for diffs], Sat Sep 9 02:57:15 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.20.2.1: +842 -0 lines
Diff to previous 1.20.2.1 (colored) next main 1.21 (colored) to selected 1.1.2.2 (colored)

sync with head

Revision 1.20.2.1, Fri Sep 8 21:57:38 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.20: +0 -784 lines
FILE REMOVED

file kern_auth.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:57:15 +0000

Revision 1.20 / (download) - annotate - [select for diffs], Fri Sep 8 21:57:38 2006 UTC (17 years, 7 months ago) by elad
Branch: MAIN
Branch point for: rpaulo-netinet-merge-pcb
Changes since 1.19: +4 -1 lines
Diff to previous 1.19 (colored) to selected 1.1.2.2 (colored)

Add __KERNEL_RCSID(), requested by and okay xtraeme@.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Sep 8 20:58:57 2006 UTC (17 years, 7 months ago) by elad
Branch: MAIN
Changes since 1.18: +44 -105 lines
Diff to previous 1.18 (colored) to selected 1.1.2.2 (colored)

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! :)

Revision 1.3.2.5 / (download) - annotate - [select for diffs], Sun Sep 3 15:25:22 2006 UTC (17 years, 7 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.3.2.4: +21 -12 lines
Diff to previous 1.3.2.4 (colored) to branchpoint 1.3 (colored) to selected 1.1.2.2 (colored)

sync with head.

Revision 1.18 / (download) - annotate - [select for diffs], Sat Sep 2 20:10:24 2006 UTC (17 years, 7 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: newlock2
Changes since 1.17: +5 -1 lines
Diff to previous 1.17 (colored) to selected 1.1.2.2 (colored)

Short-circuit calls to kauth_authorize_action() for a scope withtout any
listeners to always return "allow".

The idea is that it's not entirely unlikely that some vendors, or users,
will decide to load the security model as an LKM, and that can only
happen after at least mounting local file-systems. If we would not have
this fast-path, all authorization requests would be denied.

okay christos@

Revision 1.15.2.2 / (download) - annotate - [select for diffs], Thu Aug 24 12:39:52 2006 UTC (17 years, 7 months ago) by tron
Branch: abandoned-netbsd-4
Changes since 1.15.2.1: +4 -0 lines
Diff to previous 1.15.2.1 (colored) to branchpoint 1.15 (colored) next main 1.16 (colored) to selected 1.1.2.2 (colored)

Pull up following revision(s) (requested by elad in ticket #42):
	sys/kern/kern_auth.c: revision 1.17
From Elad:
Attached diff short-circuits kauth_authorize_action() if the request
comes from the kernel (NOCRED or FSCRED).
okay matt@

Revision 1.15.2.1 / (download) - annotate - [select for diffs], Mon Aug 21 12:28:28 2006 UTC (17 years, 8 months ago) by tron
Branch: abandoned-netbsd-4
Changes since 1.15: +13 -12 lines
Diff to previous 1.15 (colored) to selected 1.1.2.2 (colored)

Pull up following revision(s) (requested by elad in ticket #33):
	sys/kern/kern_auth.c: revision 1.16
Pretending to be Elad's keyboard:
Attached diff let's call kauth_register_scope() with a NULL default
listener. from tn2127:
"callback is the address of the listener callback function for this
scope; this becomes the scope's default listener. This parameter may be
NULL, in which case a callback that always returns KAUTH_RESULT_DEFER is
assumed."

Revision 1.17 / (download) - annotate - [select for diffs], Sun Aug 20 15:05:14 2006 UTC (17 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.16: +5 -1 lines
Diff to previous 1.16 (colored) to selected 1.1.2.2 (colored)

From Elad:

Attached diff short-circuits kauth_authorize_action() if the request
comes from the kernel (NOCRED or FSCRED).

okay matt@

Revision 1.16 / (download) - annotate - [select for diffs], Wed Aug 16 17:57:26 2006 UTC (17 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.15: +13 -12 lines
Diff to previous 1.15 (colored) to selected 1.1.2.2 (colored)

Pretending to be Elad's keyboard:

Attached diff let's call kauth_register_scope() with a NULL default
listener. from tn2127:

"callback is the address of the listener callback function for this
scope; this becomes the scope's default listener. This parameter may be
NULL, in which case a callback that always returns KAUTH_RESULT_DEFER is
assumed."

Revision 1.3.2.4 / (download) - annotate - [select for diffs], Fri Aug 11 15:45:46 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.3.2.3: +51 -28 lines
Diff to previous 1.3.2.3 (colored) to branchpoint 1.3 (colored) to selected 1.1.2.2 (colored)

sync with head

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jul 26 17:13:26 2006 UTC (17 years, 8 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base
Branch point for: abandoned-netbsd-4
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored) to selected 1.1.2.2 (colored)

make the sleepable assertion in #if 0 (with commented out LOCKDEBUG for
later) until we sort that stuff out.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:10 2006 UTC (17 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.13: +3 -4 lines
Diff to previous 1.13 (colored) to selected 1.1.2.2 (colored)

Use the LWP cached credentials where sane.

Revision 1.13 / (download) - annotate - [select for diffs], Sat Jul 22 09:24:25 2006 UTC (17 years, 9 months ago) by elad
Branch: MAIN
Changes since 1.12: +6 -1 lines
Diff to previous 1.12 (colored) to selected 1.1.2.2 (colored)

if LOCKDEBUG, assert that we can sleep in kauth_authorize_action().
discussed with yamt@ on tech-kern.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Jul 17 14:47:02 2006 UTC (17 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.11: +5 -6 lines
Diff to previous 1.11 (colored) to selected 1.1.2.2 (colored)

- Don't cast kauth_cred_t to (struct ucred *), just set pc_ucred = NULL.
- Fill ucred::cr_ref.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jul 17 14:37:20 2006 UTC (17 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.10: +26 -19 lines
Diff to previous 1.10 (colored) to selected 1.1.2.2 (colored)

- Only acquire cr_lock when changing cr_refcnt.
- When freeing, test the value of cr_refcnt from inside the lock perimiter.
- Change some uint16_t/uint32_t types to u_int.
- KASSERT(cr_refcnt > 0) in appropriate places.
- KASSERT(cr_refcnt == 1) when changing the credential.

Revision 1.10 / (download) - annotate - [select for diffs], Sun Jul 16 20:10:11 2006 UTC (17 years, 9 months ago) by elad
Branch: MAIN
Changes since 1.9: +14 -1 lines
Diff to previous 1.9 (colored) to selected 1.1.2.2 (colored)

add KAUTH_GENERIC_CANSEE, which is like the KAUTH_PROCESS_CANSEE, only
for two kauth_cred_t rather than kauth_cred_t and struct proc *.

advise against using it in the man-page; it should be used only in cases
where we either don't have an object-specific op or when we can't easily
use one.

Revision 1.9 / (download) - annotate - [select for diffs], Sat Jul 15 05:54:56 2006 UTC (17 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored) to selected 1.1.2.2 (colored)

kauth_cred_setgroups: fix an assertion.

Revision 1.3.2.3 / (download) - annotate - [select for diffs], Mon Jun 26 12:52:56 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.3.2.2: +15 -34 lines
Diff to previous 1.3.2.2 (colored) to branchpoint 1.3 (colored) to selected 1.1.2.2 (colored)

sync with head.

Revision 1.8.4.2 / (download) - annotate - [select for diffs], Wed Jun 21 15:09:37 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.8.4.1: +810 -0 lines
Diff to previous 1.8.4.1 (colored) to branchpoint 1.8 (colored) to selected 1.1.2.2 (colored)

sync with head.

Revision 1.2.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 04:07:15 2006 UTC (17 years, 10 months ago) by chap
Branch: chap-midi
Changes since 1.2: +23 -39 lines
Diff to previous 1.2 (colored) next main 1.3 (colored) to selected 1.1.2.2 (colored)

Sync with head.

Revision 1.8.4.1, Tue Jun 13 22:56:46 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.8: +0 -810 lines
FILE REMOVED

file kern_auth.c was added on branch yamt-lazymbuf on 2006-06-21 15:09:37 +0000

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jun 13 22:56:46 2006 UTC (17 years, 10 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base
Branch point for: yamt-lazymbuf
Changes since 1.7: +1 -8 lines
Diff to previous 1.7 (colored) to selected 1.1.2.2 (colored)

The UID_MAX limit is not enforced by syscalls such as setreuid(2),
so I remove the assertion uid >= 0 && uid <= UID_MAX.  This squashes
a bug where Quagga would panic my machine by passing a UID outside
the range [0, UID_MAX].

AFAICT, this restores the historical (pre-kauth) behavior.

It is likely that GIDs do not satisfy the assertion gid >= 0 &&
gid <= GID_MAX, so remove that, too.

Patch from elad.

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jun 13 13:56:50 2006 UTC (17 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.6: +5 -9 lines
Diff to previous 1.6 (colored) to selected 1.1.2.2 (colored)

remove unnecessary arguments from kauth_authorize_process.
ie. make it similar to the one found in apple TN.

Revision 1.6.2.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:38:07 2006 UTC (17 years, 10 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.6.2.1: +821 -0 lines
Diff to previous 1.6.2.1 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored) to selected 1.1.2.2 (colored)

Sync with head.

Revision 1.6.2.1, Sun May 28 06:52:17 2006 UTC (17 years, 10 months ago) by kardel
Branch: simonb-timecounters
Changes since 1.6: +0 -821 lines
FILE REMOVED

file kern_auth.c was added on branch simonb-timecounters on 2006-06-01 22:38:07 +0000

Revision 1.6 / (download) - annotate - [select for diffs], Sun May 28 06:52:17 2006 UTC (17 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: simonb-timecounters-base
Branch point for: simonb-timecounters
Changes since 1.5: +5 -5 lines
Diff to previous 1.5 (colored) to selected 1.1.2.2 (colored)

make some internal variables static.

Revision 1.5 / (download) - annotate - [select for diffs], Sun May 28 06:49:27 2006 UTC (17 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.4: +2 -10 lines
Diff to previous 1.4 (colored) to selected 1.1.2.2 (colored)

remove kauth_cred_destroy, which isn't used anymore.  ok'ed by Elad Efrat.

Revision 1.4 / (download) - annotate - [select for diffs], Wed May 24 23:00:49 2006 UTC (17 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.3: +4 -4 lines
Diff to previous 1.3 (colored) to selected 1.1.2.2 (colored)

kauth_cred_uucmp: fix inversed return code.  PR/33546 from Juan RP.

Revision 1.3.4.2 / (download) - annotate - [select for diffs], Wed May 24 15:50:40 2006 UTC (17 years, 10 months ago) by tron
Branch: peter-altq
Changes since 1.3.4.1: +829 -0 lines
Diff to previous 1.3.4.1 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored) to selected 1.1.2.2 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.3.2.2 / (download) - annotate - [select for diffs], Wed May 24 10:58:40 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.3.2.1: +829 -0 lines
Diff to previous 1.3.2.1 (colored) to branchpoint 1.3 (colored) to selected 1.1.2.2 (colored)

sync with head.

Revision 1.3.4.1, Tue May 23 00:43:30 2006 UTC (17 years, 11 months ago) by tron
Branch: peter-altq
Changes since 1.3: +0 -829 lines
FILE REMOVED

file kern_auth.c was added on branch peter-altq on 2006-05-24 15:50:40 +0000

Revision 1.3.2.1, Tue May 23 00:43:30 2006 UTC (17 years, 11 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.3: +0 -829 lines
FILE REMOVED

file kern_auth.c was added on branch yamt-pdpolicy on 2006-05-24 10:58:40 +0000

Revision 1.3 / (download) - annotate - [select for diffs], Tue May 23 00:43:30 2006 UTC (17 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5
Branch point for: yamt-pdpolicy, peter-altq
Changes since 1.2: +9 -6 lines
Diff to previous 1.2 (colored) to selected 1.1.2.2 (colored)

KNF.  wrap a long line.

Revision 1.2 / (download) - annotate - [select for diffs], Sun May 14 21:12:38 2006 UTC (17 years, 11 months ago) by elad
Branch: MAIN
Branch point for: chap-midi
Changes since 1.1: +826 -0 lines
Diff to previous 1.1 (colored) to selected 1.1.2.2 (colored)

add kauth backend.

Revision 1.1.2.27 / (download) - annotate - [select for diffs], Wed Apr 19 05:15:32 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.26: +0 -0 lines
Diff to previous 1.1.2.26 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored) to selected 1.1.2.2 (colored)

re-add kern_auth.c and kauth.h lost in commit storm

Revision 1.1.2.26, Wed Apr 19 05:13:59 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.25: +1 -1 lines
FILE REMOVED

sync with head.

Revision 1.1.2.25 / (download) - annotate - [select for diffs], Thu Apr 13 20:04:40 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.24: +10 -5 lines
Diff to previous 1.1.2.24 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

Deprecate use of CURTAIN() where it's easy -- now it's done via kauth(9),
process scope, CANSEE.

Revision 1.1.2.24 / (download) - annotate - [select for diffs], Tue Mar 14 02:49:15 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.23: +23 -82 lines
Diff to previous 1.1.2.23 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

Some cleanup...

Add kauth_cred_[sg]etgroups(), and remove kauth_cred_{add,del}group().
Don't sort the groups when adding them; the caller should do this for
us. This maintains same behavior.
And since we're no longer sorting our groups, revert back to the simple
linear search, as suggested by yamt@.

Revision 1.1.2.23 / (download) - annotate - [select for diffs], Sun Mar 12 23:41:07 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.22: +14 -4 lines
Diff to previous 1.1.2.22 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

The group list we keep in kauth_cred_t is always sorted, so use binary
search for kauth_cred_ismember_gid().

Revision 1.1.2.22 / (download) - annotate - [select for diffs], Sun Mar 12 17:15:15 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.21: +3 -3 lines
Diff to previous 1.1.2.21 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

Rename kauth_cred_compare() to kauth_cred_uucmp(), and kauth_cred_convert()
to kauth_cred_uucvt(). This makes it clearer that we're working on struct
uucred.

Inspired by comments from yamt@.

Revision 1.1.2.21 / (download) - annotate - [select for diffs], Sun Mar 12 00:26:56 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.20: +2 -2 lines
Diff to previous 1.1.2.20 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

Make kauth_cred_uidmatch() static.

Revision 1.1.2.20 / (download) - annotate - [select for diffs], Sun Mar 12 00:10:18 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.19: +1 -11 lines
Diff to previous 1.1.2.19 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

We no longer need kauth_cred_memcmp().

Revision 1.1.2.19 / (download) - annotate - [select for diffs], Sat Mar 11 16:45:25 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.18: +9 -21 lines
Diff to previous 1.1.2.18 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

When calling kauth_cred_ismember_gid(), don't return the error code if
there is one, just treat it as if the check failed.

Pointed out by thorpej@.

Revision 1.1.2.18 / (download) - annotate - [select for diffs], Sat Mar 11 05:17:51 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.17: +5 -3 lines
Diff to previous 1.1.2.17 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

Declare i in the appropriate scope, and the array is cr_groups... err...

Revision 1.1.2.17 / (download) - annotate - [select for diffs], Sat Mar 11 05:08:42 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.16: +13 -4 lines
Diff to previous 1.1.2.16 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

Get rid of the memcmp() call in kauth_cred_compare(), and just iterate
over the groups in the struct uucred and check each of them with a call
to kauth_cred_ismember_gid().

Revision 1.1.2.16 / (download) - annotate - [select for diffs], Sat Mar 11 04:55:28 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.15: +24 -5 lines
Diff to previous 1.1.2.15 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

kauth_cred_groupmember() -> kauth_cred_ismember_gid(), as requested by
thorpej@ to conform to the Darwin KPI.

Revision 1.1.2.15 / (download) - annotate - [select for diffs], Sat Mar 11 03:21:16 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.14: +1 -11 lines
Diff to previous 1.1.2.14 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

Remove no longer used kauth_cred_setngroups().

Revision 1.1.2.14 / (download) - annotate - [select for diffs], Fri Mar 10 22:50:05 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.13: +1 -14 lines
Diff to previous 1.1.2.13 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

Get rid of kauth_cred_zero().

Revision 1.1.2.13 / (download) - annotate - [select for diffs], Fri Mar 10 19:11:50 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.12: +2 -10 lines
Diff to previous 1.1.2.12 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

Some cleanup.

kauth_cred_setrefcnt() was only called after kauth_cred_convert() in NFS
code to convert a struct uucred to kauth_cred_t. Since there's no valid
use for such a function, make kauth_cred_convert() set the reference
count to 1 and eliminate the need for kauth_cred_setrefcnt() entirely.

Motivated by comments from yamt@ and thorpej@.

Revision 1.1.2.12 / (download) - annotate - [select for diffs], Fri Mar 10 13:21:54 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.11: +2 -2 lines
Diff to previous 1.1.2.11 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

generic_authorize() -> kauth_authorize_generic().

Revision 1.1.2.11 / (download) - annotate - [select for diffs], Fri Mar 10 11:53:55 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.10: +3 -3 lines
Diff to previous 1.1.2.10 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

process_authorize() -> kauth_authorize_process(), to be closer to the
original and as requested by yamt@ and thorpej@.

Revision 1.1.2.10 / (download) - annotate - [select for diffs], Thu Mar 9 23:47:07 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.9: +1 -4 lines
Diff to previous 1.1.2.9 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

No need to zero before pool_put().

Revision 1.1.2.9 / (download) - annotate - [select for diffs], Thu Mar 9 17:07:10 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.8: +20 -11 lines
Diff to previous 1.1.2.8 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

Namespace cleanup, as requested by yamt@.

Revision 1.1.2.8 / (download) - annotate - [select for diffs], Wed Mar 8 22:12:35 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.7: +2 -2 lines
Diff to previous 1.1.2.7 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

Fix some issues with set-id binaries.

Revision 1.1.2.7 / (download) - annotate - [select for diffs], Wed Mar 8 19:18:35 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.6: +3 -6 lines
Diff to previous 1.1.2.6 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

Better handling of unlocking before pool_put().

Revision 1.1.2.6 / (download) - annotate - [select for diffs], Wed Mar 8 18:49:38 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.5: +4 -4 lines
Diff to previous 1.1.2.5 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

Correct usage for kauth_cred_uidmatch().

Revision 1.1.2.5 / (download) - annotate - [select for diffs], Wed Mar 8 17:31:56 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.4: +10 -1 lines
Diff to previous 1.1.2.4 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

Implement kauth_cred_get() as suggested by thorpej@.

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Wed Mar 8 16:44:57 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.3: +12 -5 lines
Diff to previous 1.1.2.3 (colored) to branchpoint 1.1 (colored) to selected 1.1.2.2 (colored)

Fix some locking violations.

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Wed Mar 8 09:15:10 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.2: +3 -3 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (colored)

Another locking issue missed in previous commit...

Revision 1.1.2.2 / (download) - annotate - [selected], Wed Mar 8 09:06:05 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1.2.1: +10 -8 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored)

Fix some lock usage.

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Tue Mar 7 23:23:56 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.1: +872 -0 lines
Diff to previous 1.1 (colored) to selected 1.1.2.2 (colored)

Add kernel authorization routines.

Revision 1.1, Tue Mar 7 23:23:56 2006 UTC (18 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, elad-kernelauth-base
Branch point for: elad-kernelauth
FILE REMOVED

file kern_auth.c was initially added on branch elad-kernelauth.

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>