On Mon October 3 2011 13:09:21 Jim Meyering wrote: > Kamil Dudka wrote: > > On Mon October 3 2011 12:45:01 Jim Meyering wrote: > >> Can you describe how to make "ls -L" misbehave without this patch? > > > > if you have a symlink to a file with ACL, 'ls -Ll' does not print the '+' > > at end of the column with permission bits. > > Thanks. I expect to add something like this: > > $ touch k; setfacl -m user:${USER}:r k; ln -s k s; env ls -Log s > -rw-r-----. 1 0 Oct 3 13:07 s > > That "." is wrong. It should be "+".
I am having problems finding a good way to detect that ls is capable of detecting ACLs. AFAIK there is no such macro in config.h. The preprocessor games in lib/file-has-acl.c are overly complicated. What about the following scenario? 1. try ls -l directly on a regular file with ACL, check if it prints '+'. 2. if it succeeds, try the same on a regular file and a symbolic link with/without -L Kamil