Incorrect exit status from nfsmount.c...
Robert J Eggers
eggers at us.ibm.com
Mon Apr 17 00:23:04 UTC 2006
While looking into an odd nfsmount behavior with BB, I noticed the
changelog posted on http://busybox.net/downloads/ is empty -- though I
presume it shouldn't be.?:O)
My problem/concern ...
It seems nfsmount.c may return good status even when the nfsversion is
out of range. This means the return to mount.c may (?) allow for
potentially bad/incomplete data (normally assembled and then copied out
from an nfs_mount_data struct) to be passed to the mount call. Wasn't
sure whether I should just change the bad returns from nfsmount so I chose
instead to catch the bad nfs_mount_data just before the mount call. Is
there any reason to think those incorrect nfsmount returns are there for a
reason?
I'd appreciate any thoughts on this...
nfsmount call from mount.c:
if (nfsmount(mp->mnt_fsname, mp->mnt_dir, &vfsflags, &options, 1))
{
bb_perror_msg("nfsmount failed");
return 1;
}
...
else return mount_it_now(mp, vfsflags);
The code in question from nfsmount.c (around lines 575-580):
if (nfsvers > MAX_NFSPROT) {
bb_error_msg("NFSv%d not supported!", nfsvers);
return 0;
}
if (mountvers > MAX_NFSPROT) {
bb_error_msg("NFSv%d not supported!", nfsvers);
return 0;
}
Thanks much,
Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20060416/ccdac300/attachment.htm
More information about the busybox
mailing list