gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gluster-devel] xlator uid/guid question


From: August R. Wohlt
Subject: [Gluster-devel] xlator uid/guid question
Date: Sat, 19 Jan 2008 14:00:23 -0500

Hi glusterfs hackers,

I am trying to write a simple xlator similar to the fixed-id one that comes
with the source code.

The fixed-id xlator passes all calls through to the underlying volume and
then mangles the uid and gid of the stat structures on the way back to the
client, so what you end up with when looking at a mount is a directory of
files that appear to be owned by a fixed uid.gid, but really on the
underlying volume, they are created as the original user, which can cause
interesting permission issues.

I would like to modify this behavior so that the files get created on the
underlying volume with the fixed-id as well (even if just for the
superuser). I can do this in the chown functions with something like this
easy enough:

 struct fixed_id *id = (struct fixed_id *)this->private;
  if (id->fixed_uid_set) uid = id->fixed_uid;

before the STACK_WIND, and it works when I chown a file on the mount, but
how do I intercept the uid when a file is being created in the first place?
I don't see any arguments to create() that are applicable. Does fuse just
use the user from the calling process to do this?


cheers,
august


reply via email to

[Prev in Thread] Current Thread [Next in Thread]