cvs commit: src/sys/security/mac_biba mac_biba.csrc/sys/security/mac_mls mac_mls.c

Robert Watson rwatson at FreeBSD.org
Sat May 31 12:01:45 PDT 2003


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


More information about the cvs-src mailing list