Subject: bin/2977: Dump parsing of fstab incorrect
To: None <gnats-bugs@gnats.netbsd.org>
From: None <paul@pgoyette.bdt.com>
List: netbsd-bugs
Date: 11/30/1996 07:00:17
>Number: 2977
>Category: bin
>Synopsis: Dump parsing of fstab incorrect
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Nov 30 07:20:02 1996
>Last-Modified:
>Originator: Paul Goyette
>Organization:
>Release: Nov 27 1996
>Environment:
System: NetBSD pgoyette.bdt.com 1.2B NetBSD 1.2B (PGOYETTE) #168:
Wed Nov 27 05:41:56 PST 1996
paul@pgoyette.bdt.com:/home/paul/src/sys/arch/mac68k/compile/PGOYETTE
(current as of Wed Nov 27 04:32:35 1996) mac68k
>Description:
Dump incorrectly parses /etc/fstab. With the following fstab entries
`dump /usr/src' incorrectly matches the _second_ line and attempts to
dump raw device /usr/rsrc, rather than matching the first line and
dumping /dev/rsd0h.
# filesys mount point type access dump fsck
# location + opts freq pass
#
/dev/sd0h /usr/src ffs rw 30 2
/usr/src /home/paul/src union rw,noauto,-b 0 0
>How-To-Repeat:
See above.
>Fix:
Since dump only knows about ufs/ffs file systems anyway, the
following patch limits dump to looking at entries in /etc/fstab
with the appropriate filesystem type.
--- /usr/src/sbin/dump/optr.c Sun May 19 04:37:33 1996
+++ /home/paul/src/sbin/dump/optr.c Sat Nov 30 06:00:24 1996
@@ -444,6 +444,9 @@
strcmp(fs->fs_type, FSTAB_RO) &&
strcmp(fs->fs_type, FSTAB_RQ))
continue;
+ if (strcmp(fs->fs_vfstype, "ufs") &&
+ strcmp(fs->fs_vfstype, "ffs"))
+ continue;
fs = allocfsent(fs);
if ((pf = (struct pfstab *)malloc(sizeof (*pf))) == NULL)
quit("%s\n", strerror(errno));
>Audit-Trail:
>Unformatted: