From f5baa0d22d1f068438b4c923f6f4ed878b122aeb Mon Sep 17 00:00:00 2001 From: rmacklem Date: Mon, 22 May 2017 21:41:34 +0000 Subject: [PATCH] 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. --- sbin/mount_nfs/mount_nfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c index 149d127a11d..91933371876 100644 --- a/sbin/mount_nfs/mount_nfs.c +++ b/sbin/mount_nfs/mount_nfs.c @@ -651,7 +651,7 @@ getnfsargs(char *spec, struct iovec **iov, int *iovlen) 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); } -- 2.45.0