summaryrefslogtreecommitdiffstats
path: root/sys/security/mac_biba/mac_biba.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2010-03-02 15:05:48 +0000
committerrwatson <rwatson@FreeBSD.org>2010-03-02 15:05:48 +0000
commit787cf8d03f1c58ada088933408f30fd63de85bf2 (patch)
treed56c4f561dee5da59fbe2a63d4e3b35df9592d35 /sys/security/mac_biba/mac_biba.c
parentdaccf654120791da2a3532d71d7c523ad28ea18a (diff)
downloadFreeBSD-src-787cf8d03f1c58ada088933408f30fd63de85bf2.zip
FreeBSD-src-787cf8d03f1c58ada088933408f30fd63de85bf2.tar.gz
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
Diffstat (limited to 'sys/security/mac_biba/mac_biba.c')
-rw-r--r--sys/security/mac_biba/mac_biba.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/security/mac_biba/mac_biba.c b/sys/security/mac_biba/mac_biba.c
index e66e089..fcede07 100644
--- a/sys/security/mac_biba/mac_biba.c
+++ b/sys/security/mac_biba/mac_biba.c
@@ -955,6 +955,7 @@ biba_devfs_create_device(struct ucred *cred, struct mount *mp,
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
OpenPOWER on IntegriCloud