summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volume-set.c
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2019-01-18 17:26:36 +0530
committerAmar Tumballi <amarts@redhat.com>2019-01-22 05:23:44 +0000
commit3c556353cd1dde0593096c9e9e11b877403971f0 (patch)
tree55e87230b06cf8ed635eef434dbb70a63dd736f2 /xlators/mgmt/glusterd/src/glusterd-volume-set.c
parent4f58d35f064e5fba3a02b7be8b2525ebe2114254 (diff)
locks/fencing: Add a security knob for fencing
There is a low level security issue with fencing since one client can preempt another client's lock. This patch does not completely eliminate the issue of a client misbehaving, but certainly it adds a security layer for default use cases that does not need fencing. Change-Id: I55cd15f2ed1ae0f2556e3d27a2ef4bc10fdada1c updates: #466 Signed-off-by: Susant Palai <spalai@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volume-set.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index fd5a8227c6b..d952a39d23e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -2947,4 +2947,12 @@ struct volopt_map_entry glusterd_volopt_map[] = {
.voltype = "features/cloudsync",
.op_version = GD_OP_VERSION_5_0,
.flags = VOLOPT_FLAG_CLIENT_OPT},
+ {.key = "features.enforce-mandatory-lock",
+ .voltype = "features/locks",
+ .value = "off",
+ .type = NO_DOC,
+ .op_version = GD_OP_VERSION_6_0,
+ .validate_fn = validate_boolean,
+ .description = "option to enforce mandatory lock on a file",
+ .flags = VOLOPT_FLAG_XLATOR_OPT},
{.key = NULL}};