diff options
author | Rick Macklem <rmacklem@FreeBSD.org> | 2017-05-08 00:45:05 +0000 |
---|---|---|
committer | Rick Macklem <rmacklem@FreeBSD.org> | 2017-05-08 00:45:05 +0000 |
commit | 136227630318207dcc355cb23468d07db01b2538 (patch) | |
tree | 41d667524e0f0403606db9c4b306be581d5eb680 /sbin/mount_nfs | |
parent | 930d3f4a60efa0339da007f0a383542b64a7622b (diff) | |
download | src-136227630318207dcc355cb23468d07db01b2538.tar.gz src-136227630318207dcc355cb23468d07db01b2538.zip |
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@.
Reported by: clbuisson@orange.fr
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=317931
Diffstat (limited to 'sbin/mount_nfs')
-rw-r--r-- | sbin/mount_nfs/mount_nfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c index f04e32b7d3d5..93f6a9cb8347 100644 --- a/sbin/mount_nfs/mount_nfs.c +++ b/sbin/mount_nfs/mount_nfs.c @@ -636,7 +636,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); } |