History log of /freebsd-10-stable/usr.sbin/mountd/mountd.c
Revision Date Author Comments
# 333198 03-May-2018 avg

MFC r332559: mountd: fix a crash when getgrouplist reports too many groups

Sponsored by: Panzura


# 330093 28-Feb-2018 rpokala

MFC r329682:

mountd: Return proper errno values in a few error paths

When attempting to mount a non-directory which exists, return ENOTDIR
instead of ENOENT. If stat() or statfs() failed, don't pass part of the
invalid (struct statfs) to ex_search(). In that same case, preserve the
value of "bad" rather than overwriting with EACCES.


# 308452 08-Nov-2016 rmacklem

MFC: r307890
mountd(8) was erroneously setting the sysctl for the old NFS server
when the new/default NFS server was running, for the "-n" option.

This patch fixes the problem for stable/10 and stable/9.
Since the new NFS server uses vfs.nfsd.nfs_privport == 0 by default,
there wouldn't have been many users affected by the code not setting
it to 0 when the "-n" option was specified.


# 294124 15-Jan-2016 jpaetzel

MFC 293305

Allow /etc/exports to contain usernames/groups with spaces in them.

If you are getting your users/groups from a directory service such
as LDAP or AD it's possible for those usernames or groupnames to
contain spaces.

Submitted by: Sean E. Fagan
Reviewed by: rmacklem
Sponsored by: iXsystems


# 283762 29-May-2015 rmacklem

MFC: r283008
Add a warning message to mountd for exported file
systems that are automounted, since that configuration
isn't supported. This still allows the export, since
two emails I received felt that this should not be
disabled. It sends the message to syslog(LOG_ERR..), so that
it goes to the same places as the other messages related
to /etc/exports problems, even though it is a warning and not an error.


# 282915 14-May-2015 sjg

No need to delete export from filesystems which are not exported.


# 279224 23-Feb-2015 kib

MFC r278523:
In mountd, silence a race with the parallel unmount.


# 277859 28-Jan-2015 rstone

MFC r277352:

When mountd is creating sockets, it iterates over all addresses specified
in the "hosts" array and eventually looks up the network address with
getaddrinfo(). At one point it checks for a numeric address and if it
sees one, it sets a hint parameter to force getaddrinfo to interpret the
host as a numeric address. However that hint is not cleared for subsequent
iterations of the loop and if any hosts seen after this point are host names,
getaddrinfo will fail on the name. The result of this bug is that you cannot
pass a host name to the -h flag.

Unfortunately, the first iteration will either process ::1 or 127.0.0.1,
so the flag is set on the first iteration and all host names will fail
to be processed.

The same bug applies to rpc.lockd and rpc.statd, so fix them too.

Differential Revision: https://reviews.freebsd.org/D1507
Reported by: Dylan Martin
MFC after: 1 week
Sponsored by: Sandvine Inc.


# 272428 02-Oct-2014 bdrewery

MFC r270183:

Avoid showing stale errors when nmount(2) fails.

This should not be documented in relnotes as it still fails due to a
race with unmounting, but no longer shows bogus details.

Approved by: re (gjb)


# 283762 29-May-2015 rmacklem

MFC: r283008
Add a warning message to mountd for exported file
systems that are automounted, since that configuration
isn't supported. This still allows the export, since
two emails I received felt that this should not be
disabled. It sends the message to syslog(LOG_ERR..), so that
it goes to the same places as the other messages related
to /etc/exports problems, even though it is a warning and not an error.


# 282915 14-May-2015 sjg

No need to delete export from filesystems which are not exported.


# 279224 23-Feb-2015 kib

MFC r278523:
In mountd, silence a race with the parallel unmount.


# 277859 28-Jan-2015 rstone

MFC r277352:

When mountd is creating sockets, it iterates over all addresses specified
in the "hosts" array and eventually looks up the network address with
getaddrinfo(). At one point it checks for a numeric address and if it
sees one, it sets a hint parameter to force getaddrinfo to interpret the
host as a numeric address. However that hint is not cleared for subsequent
iterations of the loop and if any hosts seen after this point are host names,
getaddrinfo will fail on the name. The result of this bug is that you cannot
pass a host name to the -h flag.

Unfortunately, the first iteration will either process ::1 or 127.0.0.1,
so the flag is set on the first iteration and all host names will fail
to be processed.

The same bug applies to rpc.lockd and rpc.statd, so fix them too.

Differential Revision: https://reviews.freebsd.org/D1507
Reported by: Dylan Martin
MFC after: 1 week
Sponsored by: Sandvine Inc.


# 272428 02-Oct-2014 bdrewery

MFC r270183:

Avoid showing stale errors when nmount(2) fails.

This should not be documented in relnotes as it still fails due to a
race with unmounting, but no longer shows bogus details.

Approved by: re (gjb)