From owner-p4-projects@FreeBSD.ORG Mon Aug 25 09:22:09 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2173C106567A; Mon, 25 Aug 2008 09:22:09 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D92CC1065679 for ; Mon, 25 Aug 2008 09:22:08 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D51258FC1E for ; Mon, 25 Aug 2008 09:22:08 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7P9M8ON081987 for ; Mon, 25 Aug 2008 09:22:08 GMT (envelope-from trasz@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7P9M80G081985 for perforce@freebsd.org; Mon, 25 Aug 2008 09:22:08 GMT (envelope-from trasz@freebsd.org) Date: Mon, 25 Aug 2008 09:22:08 GMT Message-Id: <200808250922.m7P9M80G081985@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to trasz@freebsd.org using -f From: Edward Tomasz Napierala To: Perforce Change Reviews Cc: Subject: PERFORCE change 148365 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Aug 2008 09:22:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=148365 Change 148365 by trasz@trasz_traszkan on 2008/08/25 09:22:03 Make mac_biba, mac_lomac and mac_mls granularity-compliant. NOTE: I have no idea if this works. I didn't test it. Affected files ... .. //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_biba/mac_biba.c#5 edit .. //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_lomac/mac_lomac.c#4 edit .. //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_mls/mac_mls.c#5 edit Differences ... ==== //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_biba/mac_biba.c#5 (text+ko) ==== @@ -2830,11 +2830,11 @@ obj = SLOT(vplabel); /* XXX privilege override for admin? */ - if (acc_mode & (VREAD | VEXEC | VSTAT)) { + if (acc_mode & (VREAD | VEXEC | VSTAT_PERMS)) { if (!biba_dominate_effective(obj, subj)) return (EACCES); } - if (acc_mode & (VWRITE | VAPPEND | VADMIN)) { + if (acc_mode & VMODIFY_PERMS) { if (!biba_dominate_effective(subj, obj)) return (EACCES); } ==== //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_lomac/mac_lomac.c#4 (text+ko) ==== @@ -2378,7 +2378,7 @@ obj = SLOT(vplabel); /* XXX privilege override for admin? */ - if (acc_mode & (VWRITE | VAPPEND | VADMIN)) { + if (acc_mode & VMODIFY_PERMS) { if (!lomac_subject_dominate(subj, obj)) return (EACCES); } ==== //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_mls/mac_mls.c#5 (text+ko) ==== @@ -2453,11 +2453,11 @@ obj = SLOT(vplabel); /* XXX privilege override for admin? */ - if (acc_mode & (VREAD | VEXEC | VSTAT)) { + if (acc_mode & (VREAD | VEXEC | VSTAT_PERMS)) { if (!mls_dominate_effective(subj, obj)) return (EACCES); } - if (acc_mode & (VWRITE | VAPPEND | VADMIN)) { + if (acc_mode & VMODIFY_PERMS) { if (!mls_dominate_effective(obj, subj)) return (EACCES); }