#
320303 |
|
24-Jun-2017 |
delphij |
MFC r320183: Reduce code duplication in rpc.lockd.
Reuse create_service code instead of duplicating it in lookup_addresses for kernel NLM.
As a (good) side effect this also fixed a few issues that were already fixed in the former but never applied to the latter.
Reviewed by: kevlo
|
#
319966 |
|
15-Jun-2017 |
delphij |
MFC r319852:
Fix buffer lengths.
After r319369, the RPC code validates caller supplied buffer length in taddr2uaddr. When no -h is specified, the sizeof(ai_addr) is used, which is always smaller than the required size and therefore uaddr would be NULL, causing the kernel to copyin() from userland NULL and fail with EFAULT.
|
#
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.
|
#
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.
|