diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2017-02-05 22:02:01 +0800 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2017-02-17 16:25:59 -0500 |
commit | c3821b3497aae1752cb2be72c32f650ef24c8820 (patch) | |
tree | d81308296a2279a0032c58e7313016f36bfdf659 /fs/lockd/xdr4.c | |
parent | d6fc8821c2d2aba4cc18447a467f543e46e7367d (diff) | |
download | linux-c3821b3497aae1752cb2be72c32f650ef24c8820.tar.gz linux-c3821b3497aae1752cb2be72c32f650ef24c8820.tar.xz |
nfsd/idmap: return nfserr_inval for 0-length names
Tigran Mkrtchyan's new pynfs testcases for zero length principals fail:
SATT16 st_setattr.testEmptyPrincipal : FAILURE
Setting empty owner should return NFS4ERR_INVAL,
instead got NFS4ERR_BADOWNER
SATT17 st_setattr.testEmptyGroupPrincipal : FAILURE
Setting empty owner_group should return NFS4ERR_INVAL,
instead got NFS4ERR_BADOWNER
This patch checks the principal and returns nfserr_inval directly. It
could check after decoding in nfs4xdr.c, but it's simpler to do it in
nfsd_map_xxxx.
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/lockd/xdr4.c')
0 files changed, 0 insertions, 0 deletions