Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 May 2017 21:52:06 +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-10@freebsd.org
Subject:   svn commit: r318683 - stable/10/sbin/mount_nfs
Message-ID:  <201705222152.v4MLq6hQ030318@repo.freebsd.org>

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

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/10/sbin/mount_nfs/mount_nfs.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/mount_nfs/mount_nfs.c
==============================================================================
--- stable/10/sbin/mount_nfs/mount_nfs.c	Mon May 22 21:41:34 2017	(r318682)
+++ stable/10/sbin/mount_nfs/mount_nfs.c	Mon May 22 21:52:06 2017	(r318683)
@@ -650,7 +650,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?201705222152.v4MLq6hQ030318>