On Mon, Dec 08, 2014 at 04:21:30PM -0800, Eric Pruitt wrote: > Unless I'm missing something, I still don't see anything in that patch > pertaining to the interpretation of slashes.
I'm not sure what you're expecting... When you lstat "foo/", where foo is a symlink to a directory, you look up information about the directory, not the symlink. "ls" does not do anything differently. You can also see that POSIX does not specify anything related to interpretation of slashes in the specification of the "ls" (because it do not need any sort of special interpretation). See, this example (pruned for the system calls that matter) $ strace ls -l foo lstat("foo", {st_mode=S_IFLNK|0777, st_size=3, ...}) = 0 stat("foo", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0 lrwxrwxrwx 1 michael michael 3 Dec 09 20:22 foo -> bar $ strace ls -l foo/ lstat("foo/", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0 -rw------- 1 michael michael 0 Dec 09 20:23 hello -rw------- 1 michael michael 0 Dec 09 20:23 world $