summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorCsaba Henk <csaba@redhat.com>2012-04-16 21:37:31 +0200
committerVijay Bellur <vijay@gluster.com>2012-05-23 02:01:02 -0700
commitf5e63d3ebb02898212b11a9a6599f3483a76568d (patch)
treeffaf8e9c85f86651fc8423e80554156d7829d300 /xlators
parent38f3920ae59fc0f0b70ccf79131901cffc493ccd (diff)
glusterd / mountbroker: warn if mountbroker-root permissions are suspected to be too strict
At the level of mountbroker, this is a best effort, as "too strict" depends on the purpose it's being used for (thus we just warn, don't err). However, it's a good guess, as it stands for existing use cases of mountbroker. Change-Id: Ic5e7d6cb44ced5509c05e0ee8a9043252470683f BUG: 765214 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3171 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3406 Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index 61d770439..a2c59d0de 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -589,6 +589,11 @@ check_prepare_mountbroker_root (char *mountbroker_root)
ret = -1;
goto out;
}
+ if (!(st.st_mode & (S_IXGRP|S_IXOTH))) {
+ gf_log ("", GF_LOG_WARNING,
+ "permissions on mountbroker-root directory %s are "
+ "probably too strict", mountbroker_root);
+ }
dfd0 = dup (dfd);
@@ -617,6 +622,11 @@ check_prepare_mountbroker_root (char *mountbroker_root)
ret = -1;
goto out;
}
+ if (!(st.st_mode & (S_IXGRP|S_IXOTH))) {
+ gf_log ("", GF_LOG_WARNING,
+ "permissions on ancestors of mountbroker-root "
+ "directory are probably too strict");
+ }
close (dfd);
dfd = dfd2;