Verify that the filesystem being referenced in fstab is indeed a UFS

filesystem. This avoids confusion with nullfs and unionfs filesystems
which reference the root of a UFS filesystem as a target.

PR:		116849
Approved by:	kib
This commit is contained in:
cy 2009-03-02 03:08:46 +00:00
parent 4613abf36a
commit bee5c21429

View File

@ -318,9 +318,10 @@ dump_getfstab(void)
return;
}
while ((fs = getfsent()) != NULL) {
if (strcmp(fs->fs_type, FSTAB_RW) &&
if ((strcmp(fs->fs_type, FSTAB_RW) &&
strcmp(fs->fs_type, FSTAB_RO) &&
strcmp(fs->fs_type, FSTAB_RQ))
strcmp(fs->fs_type, FSTAB_RQ)) ||
strcmp(fs->fs_vfstype, "ufs"))
continue;
fs = allocfsent(fs);
if ((pf = (struct pfstab *)malloc(sizeof (*pf))) == NULL)