make realpath use O_PATH when opening the file
authorRich Felker <dalias@aerifal.cx>
Sat, 31 Aug 2013 19:44:58 +0000 (15:44 -0400)
committerRich Felker <dalias@aerifal.cx>
Sat, 31 Aug 2013 19:44:58 +0000 (15:44 -0400)
commit27b4923ba00f0a7511c7ebf5f19313d6313052e9
tree30d54effafffe4e92f73aa91bb1dc5f5d25dbb1d
parent9ff8ed463caa86cb5e81419d8eb3bfb56e90f03c
make realpath use O_PATH when opening the file

this avoids failure if the file is not readable and avoids odd
behavior for device nodes, etc. on old kernels that lack O_PATH, the
old behavior (O_RDONLY) will naturally happen as the fallback.
src/misc/realpath.c