Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Mar 2010 15:05:48 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r204581 - in head/sys/security: mac_biba mac_lomac mac_mls
Message-ID:  <201003021505.o22F5mFD062301@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rwatson
Date: Tue Mar  2 15:05:48 2010
New Revision: 204581
URL: http://svn.freebsd.org/changeset/base/204581

Log:
  Update device-labeling logic for Biba, LOMAC, and MLS to recognize new-style
  pts devices when various policy ptys_equal flags are enabled.
  
  Submitted by:	Estella Mystagic <estella at mystagic.com>
  MFC after:	1 week

Modified:
  head/sys/security/mac_biba/mac_biba.c
  head/sys/security/mac_lomac/mac_lomac.c
  head/sys/security/mac_mls/mac_mls.c

Modified: head/sys/security/mac_biba/mac_biba.c
==============================================================================
--- head/sys/security/mac_biba/mac_biba.c	Tue Mar  2 13:13:12 2010	(r204580)
+++ head/sys/security/mac_biba/mac_biba.c	Tue Mar  2 15:05:48 2010	(r204581)
@@ -955,6 +955,7 @@ biba_devfs_create_device(struct ucred *c
 		biba_type = MAC_BIBA_TYPE_EQUAL;
 	else if (ptys_equal &&
 	    (strncmp(dev->si_name, "ttyp", strlen("ttyp")) == 0 ||
+	    strncmp(dev->si_name, "pts/", strlen("pts/")) == 0 ||
 	    strncmp(dev->si_name, "ptyp", strlen("ptyp")) == 0))
 		biba_type = MAC_BIBA_TYPE_EQUAL;
 	else

Modified: head/sys/security/mac_lomac/mac_lomac.c
==============================================================================
--- head/sys/security/mac_lomac/mac_lomac.c	Tue Mar  2 13:13:12 2010	(r204580)
+++ head/sys/security/mac_lomac/mac_lomac.c	Tue Mar  2 15:05:48 2010	(r204581)
@@ -1043,6 +1043,7 @@ lomac_devfs_create_device(struct ucred *
 		lomac_type = MAC_LOMAC_TYPE_EQUAL;
 	else if (ptys_equal &&
 	    (strncmp(dev->si_name, "ttyp", strlen("ttyp")) == 0 ||
+	    strncmp(dev->si_name, "pts/", strlen("pts/")) == 0 ||
 	    strncmp(dev->si_name, "ptyp", strlen("ptyp")) == 0))
 		lomac_type = MAC_LOMAC_TYPE_EQUAL;
 	else

Modified: head/sys/security/mac_mls/mac_mls.c
==============================================================================
--- head/sys/security/mac_mls/mac_mls.c	Tue Mar  2 13:13:12 2010	(r204580)
+++ head/sys/security/mac_mls/mac_mls.c	Tue Mar  2 15:05:48 2010	(r204581)
@@ -918,6 +918,7 @@ mls_devfs_create_device(struct ucred *cr
 		mls_type = MAC_MLS_TYPE_HIGH;
 	else if (ptys_equal &&
 	    (strncmp(dev->si_name, "ttyp", strlen("ttyp")) == 0 ||
+	    strncmp(dev->si_name, "pts/", strlen("pts/")) == 0 ||
 	    strncmp(dev->si_name, "ptyp", strlen("ptyp")) == 0))
 		mls_type = MAC_MLS_TYPE_EQUAL;
 	else



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003021505.o22F5mFD062301>