Suhas Athani has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1254465?usp=email ) Change subject: XDR: reject empty NLM caller_name and lock owner ...................................................................... XDR: reject empty NLM caller_name and lock owner GitHub Issue: #1404 NLM identifies the client host by caller_name and the lock owner by the oh netobj. Both are used as lookup keys (get_nsm_client(), get_nlm_owner()) and NLM cannot work with either empty, but they were decoded with xdr_string()/xdr_netobj(), which accept a zero length. Add xdr_string_nonempty() and move xdr_bytes_nonempty() from nfsv41.h to gsh_rpc.h so non-NFSv4 decoders can use them, and use them for caller_name and oh in nlm4_lock and nlm4_share. NFSv3 names are left alone since the operations already return NFS3ERR_INVAL for an empty name, and an empty MOUNT path keeps returning MNT3ERR_ACCES. Change-Id: I556516be1b9928e26b7ce24424cfcca432c869a6 Signed-off-by: Suhas Athani <Suhas.Athani@ibm.com> --- M src/Protocols/XDR/xdr_nlm4.c M src/include/gsh_rpc.h M src/include/nfsv41.h 3 files changed, 43 insertions(+), 23 deletions(-) git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/65/1254465/1 -- To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1254465?usp=email To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: ffilz/nfs-ganesha Gerrit-Branch: next Gerrit-Change-Id: I556516be1b9928e26b7ce24424cfcca432c869a6 Gerrit-Change-Number: 1254465 Gerrit-PatchSet: 1 Gerrit-Owner: Suhas Athani <Suhas.Athani@ibm.com>