From 767047377acee40f40237d2aca45cd94391cba37 Mon Sep 17 00:00:00 2001 From: Bipin Kunal Date: Mon, 27 Feb 2017 15:23:04 +0530 Subject: nfs: make subdir mounting work for Solaris 10 clients This fixes the segfault caused by solaris client in Gluster/NFS. Volname was not being parsed properly, Instead of volume name complete path was being used in nfs_mntpath_to_xlator(). Fixed it by striping volume name from complete path in nfs_mntpath_to_xlator(). Modified function name nfs3_funge_solaris_zerolen_fh() to nfs3_funge_webnfs_zerolen_fh() as zero-filled filehandle is specific to WebNFS. RFC : https://tools.ietf.org/html/rfc2055 Solaris uses WebNFS, the zero-filled FH is defined in the WebNFS spec. Logic was even added in fuction nfs3_funge_webnfs_zerolen_fh() to send subdir path in function glfs_resolve_at() instead of complete path for subdir mount. > Change-Id: I19aae3547b8910e7ed4974ee5385424cab3e834a > BUG: 1426667 > Signed-off-by: Bipin Kunal > Reviewed-on: https://review.gluster.org/16770 > Reviewed-by: Niels de Vos > Smoke: Gluster Build System > NetBSD-regression: NetBSD Build System > CentOS-regression: Gluster Build System > (cherry picked from commit 40e571339b3c19ab2a5b6a93bc46eadf2252d006) Change-Id: I21ebb1d104b6eb914af5f26a6906f161c132179c BUG: 1440228 Signed-off-by: Bipin Kunal Reviewed-on: https://review.gluster.org/17017 CentOS-regression: Gluster Build System Reviewed-by: Niels de Vos NetBSD-regression: NetBSD Build System Smoke: Gluster Build System --- api/src/glfs-resolve.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c index f8b437bab0e..d495cd21413 100644 --- a/api/src/glfs-resolve.c +++ b/api/src/glfs-resolve.c @@ -385,6 +385,9 @@ priv_glfs_resolve_at (struct glfs *fs, xlator_t *subvol, inode_t *at, int ret = -1; struct iatt ciatt = {0, }; + DECLARE_OLD_THIS; + __GLFS_ENTRY_VALIDATE_FS(fs, invalid_fs); + path = gf_strdup (origpath); if (!path) { errno = ENOMEM; @@ -510,9 +513,10 @@ priv_glfs_resolve_at (struct glfs *fs, xlator_t *subvol, inode_t *at, } out: GF_FREE (path); + __GLFS_EXIT_FS; /* do NOT loc_wipe here as only last component might be missing */ - +invalid_fs: return ret; } -- cgit From 3f26a7ba8d74af3c2f1c149160124e91fac534f8 Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Mon, 14 Aug 2017 16:27:57 -0400 Subject: api: memory leak in glfs_h_acl_get(), missing dict unref master review https://review.gluster.org/17092 circa April 2017 Fix already exists in release-3.12 and release-3.11 branches Hat tip to Shyam (srangana[at]redhat.com) who found the existing fix after sitting and debugging it with me for several hours. Reported-by: Kinglong Mee Change-Id: Ic7169fd05aff7bf46108e8ac7b1f29688a7f2358 BUG: 1481398 Signed-off-by: Kaleb S. KEITHLEY Reviewed-on: https://review.gluster.org/18037 Smoke: Gluster Build System Reviewed-by: Kinglong Mee CentOS-regression: Gluster Build System Reviewed-by: Prashanth Pai Reviewed-by: Niels de Vos --- api/src/glfs-handleops.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'api') diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c index a464b2ed195..b5fcfab713c 100644 --- a/api/src/glfs-handleops.c +++ b/api/src/glfs-handleops.c @@ -2297,13 +2297,15 @@ pub_glfs_h_acl_get (struct glfs *fs, struct glfs_object *object, goto out; ret = dict_get_str (xattr, (char *)acl_key, &acl_s); - if (ret == -1) + if (ret) goto out; acl = acl_from_text (acl_s); out: - GF_FREE (acl_s); + if (xattr) + dict_unref (xattr); + if (IA_ISLNK (object->inode->ia_type) && new_object) glfs_h_close (new_object); -- cgit