ACLs and `ls -l'

Andreas Gruenbacher a.gruenbacher at bestbits.at
Sat Feb 19 13:33:22 GMT 2000


Hello,
here's another question about 1003.1e DS17.

For `ls -l', ls needs to find out whether a file is currently associated with an
extended ACL (more that three entries) or not (it then displays a '+' after the
mode string). DS17 argues in Section B.5.6.2 why the result of stat() is not
changed to include additional information such as ACLs, etc.

Robert Watson observed in an off-list conversation that in general, one would be
interested whether the file mode permission bits accurately reflect the
permissions of a file, so that `ls -l' can display an `+' (or maybe even another
character) for other filesystems like FAT, NTFS, etc.

Within 1003.1e DS17, the only way to get at that information is acl_get_file(),
which seems too inefficient for `ls -l'.

How is this information obtained in current implementations? I know the Solaris
implementation does acl(pathp, GETACLCNT, d/c, d/c) to get the number of ACL
entries. What does Irix use?

Would the following  be a reasonable extension to pathconf()?

pathconf(path, _POSIX_TRUE_MODE)
--------------------------------
Returns 0 if the file mode permission bits accurately reflect the permissions of
path. Returns 1 if the file mode permission bits are a superset of the actual
permissions of a file.


Regards,
Andreas.

------------------------------------------------------------------------
 Andreas Gruenbacher, a.gruenbacher at computer.org
 Contact information: http://www.bestbits.at/~agruenba
To Unsubscribe: send mail to majordomo at cyrus.watson.org
with "unsubscribe posix1e" in the body of the message



More information about the posix1e mailing list