Date: Sat, 31 May 2003 12:01:44 -0700 (PDT) From: Robert Watson <rwatson@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/security/mac_biba mac_biba.csrc/sys/security/mac_mls mac_mls.c Message-ID: <200305311901.h4VJ1i00015882@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
rwatson 2003/05/31 12:01:44 PDT FreeBSD src repository Modified files: sys/security/mac_biba mac_biba.c sys/security/mac_mls mac_mls.c Log: Rewrite Biba and MLS label externalization code to use sbufs instead of C strings internally; C strings require a lot of return value checking that (a) takes a lot of space, and (b) is difficult to get right. Prior to the advent of compartment support, modeling APIs for helper functions on snprintf worked fine; with the additional complexity, the sbuf_printf() API makes a lot more sense. While doing this, break out the printing of sequential compartment lists into a helper function, mac_{biba,mls}_compartment_to_string(). This permits the main body of mac_{biba,mls}_element_to_string() to be concerned only with identifying sequential ranges rather than rendering. At a less disruptive moment, we'll push the move from snprintf()-like interface to sbuf()-like interface up into the MAC Framework layer. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Revision Changes Path 1.60 +49 -52 src/sys/security/mac_biba/mac_biba.c 1.48 +50 -53 src/sys/security/mac_mls/mac_mls.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305311901.h4VJ1i00015882>