cvs commit: src/sys/security/mac_lomac mac_lomac.c
rwatson at FreeBSD.org
Thu Aug 21 11:07:54 PDT 2003
rwatson 2003/08/21 11:07:53 PDT
FreeBSD src repository
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
Revision Changes Path
1.17 +29 -7 src/sys/security/mac_lomac/mac_lomac.c
More information about the cvs-src