Mark & Others:

> I think you may have misunderstood what people were suggesting.  They 
> weren't suggesting changing the mode of the file, but using chmod(1M) to 
> add/modify ZFS ACLs on the device file.
> 
> chmod A+user:gdm:rwx:allow <file>
> 
> See chmod(1M) or the zfs admin guide for ZFS ACL examples.

Thanks for your help.  Now GDM is using the following code to set ACL's
(spacing slightly modified for readability):

        {
                 int acl_flavor;
                 acl_flavor = pathconf("/dev/audio", _PC_ACL_ENABLED);

                 if (acl_flavor & _ACL_ACLENT_ENABLED) {
                         system ("/usr/bin/setfacl -m user:gdm:rwx,mask:rwx
                                 /dev/audio");
                         system ("/usr/bin/setfacl -m user:gdm:rwx,mask:rwx
                                 /dev/audioctl");
                 } else if (acl_flavor & _ACL_ACE_ENABLED) {
                         system ("/usr/bin/chmod A+user:gdm:rwx:allow
                                 /dev/audio");
                         system ("/usr/bin/chmod A+user:gdm:rwx:allow
                                 /dev/audioctl");
                 }
        }

That works much better, and now GDM text-to-speech works much better on
ZFS filesystems.

However, now I am wondering if it might be better to call acl(2) functions
rather than spawning off new processes via system().  Does setfacl(2), for
exmaple, work with both flavors, or would I need to call different functions
based on the acl_flavor?  I am not very familiar with working with
acl's, so any help explaining how to modify the above code to use acl
functions rather than calling system would be helpful.

Thanks,

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

Reply via email to