summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
authorKevin Vigor <kvigor@fb.com>2017-05-22 10:27:14 -0700
committerShreyas Siravara <sshreyas@fb.com>2017-09-09 00:36:15 +0000
commit0f0d00e8a53e0220b2eb81ad159b12e475ea2afb (patch)
tree0f5d071a3416903c4abf6afc975432241b032467 /libglusterfs/src
parent8250b0bf29d5423bf6014b45b43a22c6aace5576 (diff)
posix-acl: Add assume-permissive option for EACCES debugging / rug-sweeping.
Summary: Add assume-permissive option for EACCES debugging / rug-sweeping. Re-fetch permissions when needed if they're absent. This is a port of D5104707 & D5131597 to 3.8 Change-Id: I900fc66876ec8e73b04049f844c428b3d225d4ad Reviewed-on: https://review.gluster.org/18249 Reviewed-by: Shreyas Siravara <sshreyas@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/glusterfs-acl.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libglusterfs/src/glusterfs-acl.h b/libglusterfs/src/glusterfs-acl.h
index 55f94ff0509..aa591fa4417 100644
--- a/libglusterfs/src/glusterfs-acl.h
+++ b/libglusterfs/src/glusterfs-acl.h
@@ -97,6 +97,7 @@ struct posix_acl {
};
struct posix_acl_ctx {
+ gf_boolean_t was_set;
uid_t uid;
gid_t gid;
mode_t perm;
@@ -104,10 +105,23 @@ struct posix_acl_ctx {
struct posix_acl *acl_default;
};
+enum liberal_permissions_mode_t {
+ CONSERVATIVE = 0, // Do nothing.
+ LOGGING = 1, // Log interesting events.
+ INIT_PERMS = 2, // Initialize perms to 777.
+ IGNORE_ZERO_PERMS = 3, // Ignore any zero perms.
+ IGNORE_ALL_PERMS = 4, // Ignore all perms.
+};
+
struct posix_acl_conf {
gf_lock_t acl_lock;
uid_t super_uid;
struct posix_acl *minimal_acl;
+ // 'liberal_permissions_mode' is used for debugging/ papering over
+ // EACCES problems.
+ //
+ // Value should be one of liberal_permissions_mode_t.
+ uint32_t liberal_permissions_mode;
};