From owner-trustedbsd-cvs@FreeBSD.ORG Tue Oct 3 14:36:53 2006 Return-Path: X-Original-To: trustedbsd-cvs@freebsd.org Delivered-To: trustedbsd-cvs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2183A16A47E for ; Tue, 3 Oct 2006 14:36:53 +0000 (UTC) (envelope-from owner-perforce@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id C89EA43D99 for ; Tue, 3 Oct 2006 14:36:03 +0000 (GMT) (envelope-from owner-perforce@freebsd.org) Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by cyrus.watson.org (Postfix) with ESMTP id 2632E46C5F for ; Tue, 3 Oct 2006 10:36:02 -0400 (EDT) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id D035592BAD; Tue, 3 Oct 2006 14:35:53 +0000 (GMT) (envelope-from owner-perforce@freebsd.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 24C9516A5CC; Tue, 3 Oct 2006 14:35:46 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1CE8916A557 for ; Tue, 3 Oct 2006 14:35:46 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48B1843DCC for ; Tue, 3 Oct 2006 14:35:10 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k93EZA1X016372 for ; Tue, 3 Oct 2006 14:35:10 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k93EZASx016369 for perforce@freebsd.org; Tue, 3 Oct 2006 14:35:10 GMT (envelope-from millert@freebsd.org) Date: Tue, 3 Oct 2006 14:35:10 GMT Message-Id: <200610031435.k93EZASx016369@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 107178 for review X-BeenThere: trustedbsd-cvs@FreeBSD.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: TrustedBSD CVS and Perforce commit message list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Oct 2006 14:36:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=107178 Change 107178 by millert@millert_macbook on 2006/10/03 14:34:45 Use mnt_vfsstat instead of mnt_vtable to get at the vfs type string. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#17 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#17 (text+ko) ==== @@ -1185,24 +1185,18 @@ struct mount_security_struct *sbsec; int behavior, rc; - /* vfs_init() calls us with no mnt_vtable for dead_mountp */ - if (mp->mnt_vtable == NULL) - return; - - sbsec = SLOT(mntlabel); - /* TBD TBD TBD */ /* - * Make the label for the filesystem the same as the singlelabel - * which the filesystem will use if not a "multilabel" type. + * Update the mount label based on the policy. */ - rc = security_fs_use(mp->mnt_vtable->vfc_name, &behavior, &sbsec->sid); + sbsec = SLOT(mntlabel); + rc = security_fs_use(mp->mnt_vfsstat.f_fstypename, &behavior, &sbsec->sid); if (rc) { printf("%s: security_fs_use(%s) returned %d\n", __func__, - mp->mnt_vtable->vfc_name, rc); + mp->mnt_vfsstat.f_fstypename, rc); behavior = SECURITY_FS_USE_NONE; } else if (sebsd_verbose > 1) { printf("%s: security_fs_use(%s) behavior %d, sid %d\n", - __func__, mp->mnt_vtable->vfc_name, behavior, + __func__, mp->mnt_vfsstat.f_fstypename, behavior, sbsec->sid); } @@ -1253,7 +1247,7 @@ break; default: printf("%s: security_fs_use(%s) returned unrecognized " - "behavior %d\n", __func__, mp->mnt_vtable->vfc_name, + "behavior %d\n", __func__, mp->mnt_vfsstat.f_fstypename, behavior); behavior = SECURITY_FS_USE_NONE; break;