Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 May 2017 21:41:34 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r318682 - stable/11/sbin/mount_nfs
Message-ID:  <201705222141.v4MLfYTG025578@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Mon May 22 21:41:34 2017
New Revision: 318682
URL: https://svnweb.freebsd.org/changeset/base/318682

Log:
  MFC: r317931
  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.

Modified:
  stable/11/sbin/mount_nfs/mount_nfs.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/mount_nfs/mount_nfs.c
==============================================================================
--- stable/11/sbin/mount_nfs/mount_nfs.c	Mon May 22 21:17:44 2017	(r318681)
+++ stable/11/sbin/mount_nfs/mount_nfs.c	Mon May 22 21:41:34 2017	(r318682)
@@ -651,7 +651,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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705222141.v4MLfYTG025578>