summaryrefslogtreecommitdiffstats
path: root/sys/security/mac_none
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2003-06-23 01:26:34 +0000
committerrwatson <rwatson@FreeBSD.org>2003-06-23 01:26:34 +0000
commit80e2b7dc48234eba1ff0da80571d2c0354a353b9 (patch)
tree92d01b6fe3965640d61d19263fdb1f40b50d0183 /sys/security/mac_none
parentb205310e4310331bdb7215e20334462aef1a80c4 (diff)
downloadFreeBSD-src-80e2b7dc48234eba1ff0da80571d2c0354a353b9.zip
FreeBSD-src-80e2b7dc48234eba1ff0da80571d2c0354a353b9.tar.gz
Redesign the externalization APIs from the MAC Framework to
the MAC policy modules to improve robustness against C string bugs and vulnerabilities. Following these revisions, all string construction of labels for export to userspace (or elsewhere) is performed using the sbuf API, which prevents the consumer from having to perform laborious and intricate pointer and buffer checks. This substantially simplifies the externalization logic, both at the MAC Framework level, and in individual policies; this becomes especially useful when policies export more complex label data, such as with compartments in Biba and MLS. Bundled in here are some other minor fixes associated with externalization: including avoiding malloc while holding the process mutex in mac_lomac, and hence avoid a failure mode when printing labels during a downgrade operation due to the removal of the M_NOWAIT case. This has been running in the MAC development tree for about three weeks without problems. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys/security/mac_none')
-rw-r--r--sys/security/mac_none/mac_none.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/security/mac_none/mac_none.c b/sys/security/mac_none/mac_none.c
index 5a600ea..c2ce7e7 100644
--- a/sys/security/mac_none/mac_none.c
+++ b/sys/security/mac_none/mac_none.c
@@ -127,7 +127,7 @@ mac_none_destroy_label(struct label *label)
static int
mac_none_externalize_label(struct label *label, char *element_name,
- char *element_data, size_t size, size_t *len, int *claimed)
+ struct sbuf *sb, int *claimed)
{
return (0);
OpenPOWER on IntegriCloud