Re: [zfs-discuss] C code for reading ZFS ACL

2008-08-19 Thread Ian Collins
Nicolas Williams wrote: > On Fri, Aug 15, 2008 at 08:15:56PM -0600, Mark Shellenbaum wrote: > >> We are currently investigating adding more functionality to libsec to >> provide many of the things you desire. We will have iterators, editing >> capabilities and so on. >> > > I'm still iro

Re: [zfs-discuss] C code for reading ZFS ACL

2008-08-19 Thread Nicolas Williams
On Fri, Aug 15, 2008 at 08:15:56PM -0600, Mark Shellenbaum wrote: > We are currently investigating adding more functionality to libsec to > provide many of the things you desire. We will have iterators, editing > capabilities and so on. I'm still ironing a design/architecture document out. I'l

Re: [zfs-discuss] C code for reading ZFS ACL

2008-08-19 Thread Mark Shellenbaum
Joe Blount wrote: > Mark Shellenbaum wrote: >> Joe Blount wrote: > Is the acl_t intentionally designed to be opaque? > Yes, its meant to be opaque. The layout of the acl_t will likely change in the not too distant future. >>> Will old versions be supported?

Re: [zfs-discuss] C code for reading ZFS ACL

2008-08-19 Thread Joe Blount
Mark Shellenbaum wrote: > Joe Blount wrote: >> Is the acl_t intentionally designed to be opaque? >>> >>> Yes, its meant to be opaque. >>> >>> The layout of the acl_t will likely change in the not too distant >>> future. >>> >> >> Will old versions be supported? For example, if A

Re: [zfs-discuss] C code for reading ZFS ACL

2008-08-18 Thread Ian Collins
Mark Shellenbaum wrote: > Ian Collins wrote: >> Mark Shellenbaum wrote: >>> Paul B. Henson wrote: Are the libsec undocumented interfaces likely to remain the same when the acl_t structure changes? They will still require adding the prototypes to my code so the compiler know

Re: [zfs-discuss] C code for reading ZFS ACL

2008-08-18 Thread Mark Shellenbaum
Ian Collins wrote: > Mark Shellenbaum wrote: >> Paul B. Henson wrote: >>> Are the libsec undocumented interfaces likely to remain the same when the >>> acl_t structure changes? They will still require adding the prototypes to >>> my code so the compiler knows what to make of them, but less chance o

Re: [zfs-discuss] C code for reading ZFS ACL

2008-08-18 Thread Darren J Moffat
Paul B. Henson wrote: > Sweet. Might I request an acl evaluation function? Which basically, given a > user and a requested permission, returns either true (user has permission), > false (user doesn't have permission), or error condition. Similar to the > POSIX access() call, but for ACLs. If I had

Re: [zfs-discuss] C code for reading ZFS ACL

2008-08-15 Thread Ian Collins
Mark Shellenbaum wrote: > Paul B. Henson wrote: >> >> Are the libsec undocumented interfaces likely to remain the same when the >> acl_t structure changes? They will still require adding the prototypes to >> my code so the compiler knows what to make of them, but less chance of >> breakage is good.

Re: [zfs-discuss] C code for reading ZFS ACL

2008-08-15 Thread Mark Shellenbaum
Paul B. Henson wrote: > On Fri, 15 Aug 2008, Mark Shellenbaum wrote: > >> The layout of the acl_t will likely change in the not too distant future. > [...] >> of the ACL, but they aren't documented interfaces, such as acl_data() >> which will return you the pointer to the array of ace_t's and acl_

Re: [zfs-discuss] C code for reading ZFS ACL

2008-08-15 Thread Mark Shellenbaum
Joe Blount wrote: > >>> Is the acl_t intentionally designed to be opaque? >>> >> >> Yes, its meant to be opaque. >> >> The layout of the acl_t will likely change in the not too distant future. >> > > Will old versions be supported? For example, if ADM >

Re: [zfs-discuss] C code for reading ZFS ACL

2008-08-15 Thread Paul B. Henson
On Fri, 15 Aug 2008, Paul B. Henson wrote: > Ah, thanks for the pointer. Reviewing the libsec code, I see there is also > acl_type() Looks like the acl_type_t enum isn't in the public headers either though. But presumably that's not likely to change... -- Paul B. Henson | (909) 979-6361 | h

Re: [zfs-discuss] C code for reading ZFS ACL

2008-08-15 Thread Paul B. Henson
On Fri, 15 Aug 2008, Mark Shellenbaum wrote: > The layout of the acl_t will likely change in the not too distant future. [...] > of the ACL, but they aren't documented interfaces, such as acl_data() > which will return you the pointer to the array of ace_t's and acl_cnt() > that will return you th

Re: [zfs-discuss] C code for reading ZFS ACL

2008-08-15 Thread Joe Blount
Is the acl_t intentionally designed to be opaque? Yes, its meant to be opaque. The layout of the acl_t will likely change in the not too distant future. Will old versions be supported?  For example, if ADM treats it as opaque and archives the current format, after an u

Re: [zfs-discuss] C code for reading ZFS ACL

2008-08-15 Thread Mark Shellenbaum
Paul B. Henson wrote: > I asked a while back if there was any utility function to evaluate a ZFS > ACL, I didn't get much of a response and was unable to find anything, so > decided to implement my own C code. > > It appears the acl_get() function is a convenient way to read the ACL; > however, I

[zfs-discuss] C code for reading ZFS ACL

2008-08-15 Thread Paul B. Henson
I asked a while back if there was any utility function to evaluate a ZFS ACL, I didn't get much of a response and was unable to find anything, so decided to implement my own C code. It appears the acl_get() function is a convenient way to read the ACL; however, I don't see an efficient way to par