freebsd-skq/sys/security/mac_lomac
Robert Watson 84bdb0837a Correct logic for filling out a "new" label during a credential
change in mac_lomac: if both flags are set on the new label, we
may not need to always fill out the label (only if one flag is
set, not both).  Avoid stomping on a section of the label if we
are in fact modifying both elements.

Because we know that both flags will be set, we don't need to
test whether the range or single are set in later consistency
checks of the range and single -- just test them.

By checking the range of the new vs. the range of the old label
before testing the single against the new range, we implicitly
test that the new single is in the old range.  Document this
with a comment.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-08-21 18:07:52 +00:00
..
mac_lomac.c Correct logic for filling out a "new" label during a credential 2003-08-21 18:07:52 +00:00
mac_lomac.h License tweak: remove clause 3 per permission of NAI. 2002-12-03 15:26:01 +00:00