Adapted patch from José Bollo to do the "tonight we're gonna api like
it's 1999 and every path ever is from cwd or root" api versions for sockets
and as a fallback of the open fails.

There are still some holes (symlink to socket with -L will give you info
about the symlink, not the socket, and symlink to a file you can't open will
give you info about the symlink, not the file) but the correct fix is
to make O_PATH work in the kernel for the LSM functions. (If we can read
this data by path, we should be able to read it by O_PATH. We should not
need two codepaths for this.)
1 file changed