]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Bandaid for mount_nfs segfaulting with the more obscure mount options
authorpeter <peter@FreeBSD.org>
Fri, 6 Sep 2002 19:59:29 +0000 (19:59 +0000)
committerpeter <peter@FreeBSD.org>
Fri, 6 Sep 2002 19:59:29 +0000 (19:59 +0000)
commit1ec96b6cd8977d3142ed0f2b51bcea9b0a890157
tree50e8cd6fbc269ce95d971a72d2f7fd7520116923
parent5419354c9fc7ce9e7f3f8f8c77527836b83b3d93
Bandaid for mount_nfs segfaulting with the more obscure mount options
in /etc/fstab.  This isn't a real fix though and I'm still not sure
why it started failing.  mount(8) breaks up the nfs args into seperate
repeated '-o option=value' arguments.  But, the altflags variable that
we use to track things is incrementally built up each time we see the
next option and shows us the cumulative set of flags, not just the
flag that we are currently looking at.  As a result, the strstr hack
for looking up flags in a giant -o opt=val,opt=val, etc string was failing
and causing a segfault.  I do not know what changed recently that caused
this to suddenly break, but the code has been rather bogus for some time.
sbin/mount_nfs/mount_nfs.c