From 0f0d00e8a53e0220b2eb81ad159b12e475ea2afb Mon Sep 17 00:00:00 2001 From: Kevin Vigor Date: Mon, 22 May 2017 10:27:14 -0700 Subject: 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 CentOS-regression: Gluster Build System Smoke: Gluster Build System --- libglusterfs/src/glusterfs-acl.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libglusterfs') 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; }; -- cgit