[L] Change in ...nfs-ganesha[next]: idmapper: use NUL terminated strings for user and group names
Suhas Athani has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1255418?usp=email ) Change subject: idmapper: use NUL terminated strings for user and group names ...................................................................... idmapper: use NUL terminated strings for user and group names Part of github issue #1404. The idmapper, negative cache and uid2grp APIs took names as struct gsh_buffdesc, and cached names were stored without a NUL terminator even though the DBus dump code printed them with "%s". Change name2uid(), name2gid(), uname2grp() and the idmapper, negative cache and uid2grp cache interfaces to take const char *. Cached names are now stored NUL terminated and compared with strcmp(). Also fix decode_group(), which built a terminated copy of the owner_group string but passed the raw XDR buffer to name2gid(), letting strtoul() read past the end of the name when idmapping is disabled. Change-Id: I4c7de01d7e77e8545d3baccbbad6a77b8729b625 Signed-off-by: Suhas Athani <Suhas.Athani@ibm.com> --- M src/Protocols/NFS/nfs_proto_tools.c M src/idmapper/idmapper.c M src/idmapper/idmapper_cache.c M src/idmapper/idmapper_negative_cache.c M src/include/idmapper.h M src/include/uid2grp.h M src/support/uid2grp.c M src/support/uid2grp_cache.c 8 files changed, 160 insertions(+), 205 deletions(-) git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/18/1255418/1 -- To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1255418?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: I4c7de01d7e77e8545d3baccbbad6a77b8729b625 Gerrit-Change-Number: 1255418 Gerrit-PatchSet: 1 Gerrit-Owner: Suhas Athani <Suhas.Athani@ibm.com>
participants (1)
-
Suhas Athani (GerritHub)