From owner-svn-src-head@FreeBSD.ORG Tue Mar 2 15:05:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CED3106564A; Tue, 2 Mar 2010 15:05:49 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E50FD8FC17; Tue, 2 Mar 2010 15:05:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22F5mCE062305; Tue, 2 Mar 2010 15:05:48 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22F5mFD062301; Tue, 2 Mar 2010 15:05:48 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201003021505.o22F5mFD062301@svn.freebsd.org> From: Robert Watson Date: Tue, 2 Mar 2010 15:05:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204581 - in head/sys/security: mac_biba mac_lomac mac_mls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 15:05:49 -0000 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 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