3 ms·Can you not do an ordinary open without O_NOFOLLOW and then lstat the filename?by adrianratnapala 10y agoCan you not do an ordinary open without O_NOFOLLOW and then lstat the filename?cyphar 10y agoRace condition again. The file could be unlinked. fstat is the only safe way of getting stat information for an open file.loeg 10y agoRight. The right thing to do is open() with NOFOLLOW, then fstat the resulting fd. Then check for S_ISLNK(st_mode).