cvs commit: src/sys/dev/md md.c

Christian S.J. Peron csjp at FreeBSD.org
Wed Aug 17 01:24:56 GMT 2005


csjp        2005-08-17 01:24:55 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/md           md.c 
  Log:
  Ensure that file flags such as schg, sappnd (and others) are honored
  by md(4). Before this change, it was possible to by-pass these flags
  by creating memory disks which used a file as a backing store and
  writing to the device.
  
  This was discussed by the security team, and although this is problematic,
  it was decided that it was not critical as we never guarantee that root will
  be restricted.
  
  This change implements the following behavior changes:
  
  -If the user specifies the readonly flag, unset write operations before
   opening the file. If the FWRITE mask is unset, the device will be
   created with the MD_READONLY mask set. (readonly)
  -Add a check in g_md_access which checks to see if the MD_READONLY mask
   is set, if so return EROFS
  -Do not gracefully downgrade access modes without telling the user. Instead
   make the user specify their intentions for the device (assuming the file is
   read only). This seems like the more correct way to handle things.
  
  This is a RELENG_6 candidate.
  
  PR:             kern/84635
  Reviewed by:    phk
  
  Revision  Changes    Path
  1.154     +8 -8      src/sys/dev/md/md.c


More information about the cvs-all mailing list