Date: Tue, 3 Oct 2006 14:35:10 GMT From: Todd Miller <millert@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 107178 for review Message-ID: <200610031435.k93EZASx016369@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610031435.k93EZASx016369>