PERFORCE change 107178 for review
Todd Miller
millert at FreeBSD.org
Tue Oct 3 07:36:53 PDT 2006
http://perforce.freebsd.org/chv.cgi?CH=107178
Change 107178 by millert at 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;
More information about the trustedbsd-cvs
mailing list