summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2009-03-02 03:08:46 +0000
committercy <cy@FreeBSD.org>2009-03-02 03:08:46 +0000
commitbee5c21429eb9daa5588985d3f61048ca5b6a8bc (patch)
tree81346d7aedbd66ec80add3920a05fab12bc40965 /sbin
parent4613abf36a1a86bece089d14c8f98998cc45c0fa (diff)
downloadFreeBSD-src-bee5c21429eb9daa5588985d3f61048ca5b6a8bc.zip
FreeBSD-src-bee5c21429eb9daa5588985d3f61048ca5b6a8bc.tar.gz
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
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dump/optr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c
index 8fc255a..a545157 100644
--- a/sbin/dump/optr.c
+++ b/sbin/dump/optr.c
@@ -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)
OpenPOWER on IntegriCloud