From f5e63d3ebb02898212b11a9a6599f3483a76568d Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Mon, 16 Apr 2012 21:37:31 +0200 Subject: 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 Reviewed-on: http://review.gluster.com/3171 Tested-by: Gluster Build System Reviewed-by: Anand Avati Reviewed-on: http://review.gluster.com/3406 Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'xlators') 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; -- cgit