svn commit: r363625 - stable/12/usr.sbin/mountd

Rick Macklem rmacklem at uoguelph.ca
Thu Jul 30 07:03:37 UTC 2020


Ian Lepore wrote:
>On Thu, 2020-07-30 at 01:52 +0000, Rick Macklem wrote:
>> Brooks Davis wrote:
>> > Author: brooks
>> > Date: Mon Jul 27 23:18:14 2020
>> > New Revision: 363625
>> > URL: https://svnweb.freebsd.org/changeset/base/363625
>> >
>> > Log:
>> >  MFC r363439:
>> >
>> >  Correct a type-mismatch between xdr_long and the variable "bad".
>> >
>> > [...]
>> --> I can't see how the xdr.c code would work for a machine that is
>> BIG_ENDIAN and where "long" is 64bits, but we don't have any of
>> those.
>>
>
>mips64 and powerpc64 are both big endian with 64-bit long.
Oops, I didn't know that. In the past, I've run PowerPC and MIPS, but thought
they both were little endian. (I recall the arches can be run either way.)

Anyhow, take a look at head/lib/libc/xdr/xdr.c and it looks to me like it
has been broken "forever" (ever since we stopped using a K&R compiler
that would have always made "long" 32bits).

If anyone has either of these and can set up an NFS server on one of
them and then try and do an NFSv3 mount that is not allowed, it would
be interesting to see the packet trace and if the MNT RPC fails, because
it looks like it will put the high order 32bits on the wire and they'll
always be 0?

Just to clarify. The behaviour wasn't broken by this commit. I just
don't see how the commit fixes anything?

rick, who doesn't have these arches to test on.

-- Ian





More information about the svn-src-stable-12 mailing list