On Tue, Mar 31, 2009 at 02:37:02PM -0500, Mike Gerdts wrote:
> > The <user> or <group> is specified using one of the following forms:
> > posix name (eg. ahrens)
> > posix numeric id (eg. 126829)
> > sid name (eg. ahr...@sun)
> > sid numeric id (eg. S-1-12345-12423-125829)
> 
> How does this work with zones?  Suppose in the global zone I have
> passwd entries like:

ZFS stores UIDs, GIDs and SIDs on disk.  The POSIX ID/SID <-> name
resolution happens in user-land.  As such the answer to your question is
the same as for any other operating system facility that deals with
POSIX ID/SID <-> name resolution: it depends on each zone's
configuration.

(In general kernel code never deals with user/group names directly, but
with UIDs/GIDs/SIDs.  One exception is the NFSv4 code, which upcalls to
user-land to resolve NFSv4 n...@domain user/group names and vice versa.)

> jill:x:123:123:Jill Admin:/home/jill:/bin/bash
> joe:x:124:124:Joe Admin:/home/joe:/bin/bash
> 
> And in a non-global zone (called bedrock) I have:
> 
> fred:x:123:123:Fred Flintstone:/home/fred:/bin/bash
> barney:x:124:124:Barney Rubble:/home/barney:/bin/bash
> 
> Dataset rpool/quarry is delegated to the zone bedrock.
> 
> Does "zfs get all rpool/quarry" report the same thing whether it is
> run in the global zone or the non-global zone?

If you use the -n option, yes :)

Oh, but then, the -n option is for the new zfs {user|group}space
sub-command.  I don't think "zfs get" is getting that option; maybe it
should.

> Has there been any thought to using a UID resolution mechanism similar
> to that used by ps?  That is, if "zfs get ... <dataset>" is run in the
> global zone and the dataset is deleted to a non-global zone, display
> the UID rather than a possibly mistaken username.

That seems like a good idea to me.  You should send that comment to the
ARC case record (send an e-mail to psarc-...@sun.com with
"PSARC/2009/204" somewhere in the Subject: header).

Nico
-- 
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to