Re: [dev] [sbase] [PATCH v3] ls: Handle symlinks to directories properly

2014-12-08 Thread Eric Pruitt
On Mon, Dec 08, 2014 at 08:27:07PM -0800, Michael Forney wrote: > When you lstat "foo/", where foo is a symlink to a directory, you look > up information about the directory, not the symlink. > [...] > > See, this example (pruned for the system calls that matter) > > $ strace ls -l foo > lstat("foo

Re: [dev] [sbase] [PATCH v3] ls: Handle symlinks to directories properly

2014-12-08 Thread Michael Forney
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 info

Re: [dev] [sbase] [PATCH v3] ls: Handle symlinks to directories properly

2014-12-08 Thread Eric Pruitt
Unless I'm missing something, I still don't see anything in that patch pertaining to the interpretation of slashes. Eric

Re: [dev] [sbase] [PATCH] ls: Always leave room for the NULL byte in the link target

2014-12-08 Thread Dimitris Papastamos
On Mon, Dec 08, 2014 at 02:19:34AM +, Michael Forney wrote: > Otherwise, if the length of the link target is the same as BUFSIZ, we > will try to write past the end of buf. Should we perhaps be using PATH_MAX for this? I will apply this patch and we can fix it up later.