From 940d905324dda41c5415386fe44ed293c75add13 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Tue, 31 Oct 2017 14:13:28 +0530 Subject: [PATCH 629/631] fuse: fix the read-only mount flag issue DOWNSTREAM-ONLY-FIX This fix imports partial changes from upstream patch which had lot more fixes. URL: https://review.gluster.org/#/c/16313/ Change-Id: Ib28a338878e8072082d499a4571715ad9a2e6d77 BUG: 1491756 Signed-off-by: Amar Tumballi Reviewed-on: https://code.engineering.redhat.com/gerrit/121852 Reviewed-by: Niels de Vos Tested-by: RHGS Build Bot Reviewed-by: Csaba Henk Reviewed-by: Atin Mukherjee --- xlators/mount/fuse/src/fuse-bridge.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 6fe52dc29..0b3ea2d5f 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -5710,7 +5710,8 @@ init (xlator_t *this_xl) if (priv->read_only) mntflags |= MS_RDONLY; - gf_asprintf (&mnt_args, "%s%s%sallow_other,max_read=131072", + gf_asprintf (&mnt_args, "%s%s%s%sallow_other,max_read=131072", + priv->read_only ? "ro," : "", priv->acl ? "" : "default_permissions,", priv->fuse_mountopts ? priv->fuse_mountopts : "", priv->fuse_mountopts ? "," : ""); -- 2.13.6