glusterfs/tests/common-utils.rc
Krutika Dhananjay beb7abe876 features/shard: Fix permission issues
This patch does the following:
* reverts commit b467af0e99b39ef708420d3f7f6696b0ca618512
* changes ownership on shards under /.shard to be root:root
* makes readv, writev, [f]truncate, rename, and unlink fops
  to perform operations on files under /.shard with
  frame->root->{uid,gid} as 0.

This would ensure that a [f]setattr on a sharded file
does not need to be called on all the shards associated with it.

Change-Id: Idcfb8c0dd354b0baab6b2356d2ab83ce51caa20e
BUG: 1251824
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/11992
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-08-30 08:20:21 -07:00

8 lines
119 B
Plaintext

function run_cmd_as_user {
local user=$1
shift
su -m $user -c "$*" || return 1
return 0
}