svn commit: r317931 - head/sbin/mount_nfs

Rick Macklem rmacklem at FreeBSD.org
Mon May 8 00:45:07 UTC 2017


Author: rmacklem
Date: Mon May  8 00:45:05 2017
New Revision: 317931
URL: https://svnweb.freebsd.org/changeset/base/317931

Log:
  Fix mount_nfs so that it doesn't create mounttab entries for NFSv4 mounts.
  
  The NFSv4 protocol doesn't use the Mount protocol, so it doesn't make sense
  to add an entry for an NFSv4 mount to /var/db/mounttab. Also, r308871
  modified umount so that it doesn't remove any entry created by mount_nfs.
  Reported on freebsd-current at .
  
  Reported by:	clbuisson at orange.fr
  MFC after:	2 weeks

Modified:
  head/sbin/mount_nfs/mount_nfs.c

Modified: head/sbin/mount_nfs/mount_nfs.c
==============================================================================
--- head/sbin/mount_nfs/mount_nfs.c	Sun May  7 22:18:05 2017	(r317930)
+++ head/sbin/mount_nfs/mount_nfs.c	Mon May  8 00:45:05 2017	(r317931)
@@ -636,7 +636,7 @@ getnfsargs(char *spec, struct iovec **io
 
 	build_iovec(iov, iovlen, "hostname", nam, (size_t)-1);
 	/* Add mounted file system to PATH_MOUNTTAB */
-	if (!add_mtab(hostp, spec))
+	if (mountmode != V4 && !add_mtab(hostp, spec))
 		warnx("can't update %s for %s:%s", PATH_MOUNTTAB, hostp, spec);
 	return (1);
 }


More information about the svn-src-all mailing list