]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Perform overdue clean up mac_test policy:
authorRobert Watson <rwatson@FreeBSD.org>
Sun, 22 Apr 2007 11:35:15 +0000 (11:35 +0000)
committerRobert Watson <rwatson@FreeBSD.org>
Sun, 22 Apr 2007 11:35:15 +0000 (11:35 +0000)
commit6827d0294ebd670935054137e8696c68797439ce
tree099d93810181acf638d98dd59bf49b58de134bcf
parent9a6142d8cdaf65e334a5d31e32634c7a206fbcf7
Perform overdue clean up mac_test policy:

- Add a more detailed comment describing the mac_test policy.

- Add COUNTER_DECL() and COUNTER_INC() macros to declare and manage
  various test counters, reducing the verbosity of the test policy
  quite a bit.

- Add LABEL_CHECK() macro to abbreviate normal validation of labels.
  Unlike the previous check macros, this checks for a NULL label and
  doesn't test NULL labels.  This means that optionally passed labels
  will now be handled automatically, although in the case of optional
  credentials, NULL-checks are still required.

- Add LABEL_DESTROY() macro to abbreviate the handling of label
  validation and tear-down.

- Add LABEL_NOTFREE() macro to abbreviate check for non-free labels.

- Normalize the names of counters, magic values.

- Remove unused policy "enabled" flag.

Obtained from: TrustedBSD Project
sys/security/mac_test/mac_test.c