summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2018-09-03 15:49:02 +0530
committerN Balachandran <nbalacha@redhat.com>2018-09-20 15:43:18 +0000
commitb139bc58eb504adf5ef81658896c9283ae21f390 (patch)
treefc0fc8b80a7298694990e7ee45471c6dd09ef7b6 /xlators/cluster/dht
parent5e8fd8b465761e6ab09187abd56ce9930652866b (diff)
dht: Operate internal fops with negative pid
With root-squash on, all root credentials are converted to a random uid, gid(65535). And ideally this does not carry the necessary permission bits to carry out the operation. But posix-acl will allow operations from this inode as long as its ctx has the ngroup information and ngroup has the owner group information. The problem we ran into recently was somehow posix-acl xlator did not cache the ngroup info and some of the dht internal fops(layout setxattr) failed with root-squash enabled. DHT internal fops now use a negative pid to pretend that the operation is from an internal client so posix-acl allows them to pass Change-Id: I5bb8d068389bf4c94629d668a16015a95ccb53ab fixes: bz#1624796 Signed-off-by: Susant Palai <spalai@redhat.com>
Diffstat (limited to 'xlators/cluster/dht')
-rw-r--r--xlators/cluster/dht/src/dht-common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index cc1e1f02912..7d813b1acc8 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -323,6 +323,7 @@ struct dht_local {
uint32_t uid;
uint32_t gid;
+ pid_t pid;
/* needed by nufa */
int32_t flags;