nfsd4: fix wrongsec handling for PUTFH + op cases
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 8 Apr 2011 21:00:50 +0000 (17:00 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Sat, 30 Apr 2011 00:47:51 +0000 (20:47 -0400)
commit68d93184352f2e723f135b0a9bad93b58f9d120b
treeedf66ceadd6ce4559a53355b83265dc65a7d7694
parent29a78a3ed7fc9c4ee49962751eb321b038c190a2
nfsd4: fix wrongsec handling for PUTFH + op cases

When PUTFH is followed by an operation that uses the filehandle, and
when the current client is using a security flavor that is inconsistent
with the given filehandle, we have a choice: we can return WRONGSEC
either when the current filehandle is set using the PUTFH, or when the
filehandle is first used by the following operation.

Follow the recommendations of RFC 5661 in making this choice.

(Our current behavior prevented the client from doing security
negotiation by returning WRONGSEC on PUTFH+SECINFO_NO_NAME.)

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/export.c
fs/nfsd/nfs4proc.c