diff options
author | Csaba Henk <csaba@redhat.com> | 2012-04-16 21:37:31 +0200 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-05-18 22:26:44 -0700 |
commit | 46d4372003434b149a1e7cea98903e82c914e4b3 (patch) | |
tree | 1aa3aae094052f747170987aa730b004c414b953 /xlators | |
parent | bde1f0b8b645e3d8a4acfc859bb530af3d7dab5b (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>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index 61d77043950..a2c59d0de15 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; |