From 624938999bf925af710e9f73c75040416f68b756 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Wed, 25 Mar 2015 23:39:16 +0530 Subject: geo-rep: Add support for acls This patch adds support for ACLS. When it sees SETXATTR in Changelog, it adds the file to data queue. rsync/tar+ssh will take care of syncing ACLS. User set ACLS will be synced to Slave. This requires "system.posix_acl_access" to go through when client-pid is equal GF_CLIENT_PID_GSYNCD in fuse layer. New config interface is introduced, sync-acls Which can be set using geo-rep config(Default is True) gluster volume geo-replication :: \ config sync-acls false Change-Id: I7eb3523fa72b8fed830efc98138891244e830d65 BUG: 1187021 Signed-off-by: Kotresh HR Reviewed-on: http://review.gluster.org/10001 Reviewed-by: Aravinda VK Tested-by: Gluster Build System Reviewed-by: Venky Shankar Tested-by: Venky Shankar --- xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 4 ++-- xlators/mgmt/glusterd/src/glusterd.c | 4 ++-- xlators/mount/fuse/src/fuse-helpers.c | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'xlators') diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c index 8dff3d9e419..4e02b5bbf18 100644 --- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c +++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c @@ -5025,7 +5025,7 @@ create_conf_file (glusterd_conf_t *conf, char *conf_path) /* gluster-params */ runinit_gsyncd_setrx (&runner, conf_path); runner_add_args (&runner, "gluster-params", - "aux-gfid-mount", + "aux-gfid-mount acl", ".", ".", NULL); RUN_GSYNCD_CMD; @@ -5148,7 +5148,7 @@ create_conf_file (glusterd_conf_t *conf, char *conf_path) /* gluster-params */ runinit_gsyncd_setrx (&runner, conf_path); runner_add_args (&runner, "gluster-params", - "aux-gfid-mount", + "aux-gfid-mount acl", ".", NULL); RUN_GSYNCD_CMD; diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index abe35e0c26f..dc4293dcc07 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -640,7 +640,7 @@ configure_syncdaemon (glusterd_conf_t *conf) /* gluster-params */ runinit_gsyncd_setrx (&runner, conf); runner_add_args (&runner, "gluster-params", - "aux-gfid-mount", + "aux-gfid-mount acl", ".", ".", NULL); RUN_GSYNCD_CMD; @@ -764,7 +764,7 @@ configure_syncdaemon (glusterd_conf_t *conf) /* gluster-params */ runinit_gsyncd_setrx (&runner, conf); runner_add_args (&runner, "gluster-params", - "aux-gfid-mount", + "aux-gfid-mount acl", ".", NULL); RUN_GSYNCD_CMD; diff --git a/xlators/mount/fuse/src/fuse-helpers.c b/xlators/mount/fuse/src/fuse-helpers.c index ca3a08e773f..7fc41383c36 100644 --- a/xlators/mount/fuse/src/fuse-helpers.c +++ b/xlators/mount/fuse/src/fuse-helpers.c @@ -600,6 +600,8 @@ fuse_ignore_xattr_set (fuse_private_t *priv, char *key) key, FNM_PERIOD) == 0) || (fnmatch ("*.glusterfs.volume-mark.*", key, FNM_PERIOD) == 0) + || (fnmatch ("system.posix_acl_access", + key, FNM_PERIOD) == 0) || (fnmatch ("glusterfs.gfid.newfile", key, FNM_PERIOD) == 0))) ret = -1; -- cgit