nodejs / uvwasi

WASI syscall API built atop libuv
MIT License
226 stars 50 forks source link

Fix handling of UVWASI_LOOKUP_SYMLINK_FOLLOW in uvwasi_path_filestat_get #133

Closed sbc100 closed 4 years ago

sbc100 commented 4 years ago

If uvwasi_path_filestat_get the pathname is resolved by uvwasi__resolve_path which honors the UVWASI_LOOKUP_SYMLINK_FOLLOW flag.

Later we were we unconditionally calling uv_fs_stat which always follows symlinks. Instead we want to unconditionally call uv_fs_lstat which never follows them (since the resolution was already handled by the preceding call to uvwasi__resolve_path).