summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2017-05-22 21:52:06 +0000
committerrmacklem <rmacklem@FreeBSD.org>2017-05-22 21:52:06 +0000
commitc57b715531ac772fc213bc9c1c81d9a59f136f47 (patch)
tree6a76ac6638dccbe877040837ac68e5c41fe61831 /sbin
parent59dc9a9bb2a1ec42d4076119e346276be7d6996e (diff)
downloadFreeBSD-src-c57b715531ac772fc213bc9c1c81d9a59f136f47.zip
FreeBSD-src-c57b715531ac772fc213bc9c1c81d9a59f136f47.tar.gz
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.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/mount_nfs/mount_nfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c
index 836bc87..91d005c 100644
--- a/sbin/mount_nfs/mount_nfs.c
+++ b/sbin/mount_nfs/mount_nfs.c
@@ -650,7 +650,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);
}
OpenPOWER on IntegriCloud