Fix nfsd verify operation

From Linux NFS

(Difference between revisions)
Jump to: navigation, search
Bfields (Talk | contribs)
(New page: Verify and nverify take a set of attributes and compare them to existing attributes for the given object. Our server currently does this by xdr-encoding the current attributes and doing a...)

Latest revision as of 17:02, 14 January 2008

Verify and nverify take a set of attributes and compare them to existing attributes for the given object. Our server currently does this by xdr-encoding the current attributes and doing a bit-by-bit comparison with the xdr encoded attributes given us by the client.

This assumes that there is only one way to encode a given set of attributes. That assumption is false:

  • The attributes begin with a bitmap indicating which attributes are included. That bitmap is two words long. If the second word is all zeros, then the bitmap may be legimately encoded as length either 1 word or 2.
  • Ditto for bitmap in the "supported attributes" attribute.

There may be other cases. Unused acl and mode bits appear to be required to be 0, so are not a problem. I believe xdr padding (e.g. in names that are not a multiple of 4) is also required to be zero, but we should check the specs to make sure that's the case.

Personal tools