Skip to content

Handle AT_SYMLINK_NOFOLLOW in __syscall_faccessat#26500

Open
thiblahute wants to merge 1 commit intoemscripten-core:mainfrom
thiblahute:symlink_nofollow_pr
Open

Handle AT_SYMLINK_NOFOLLOW in __syscall_faccessat#26500
thiblahute wants to merge 1 commit intoemscripten-core:mainfrom
thiblahute:symlink_nofollow_pr

Conversation

@thiblahute
Copy link
Contributor

@thiblahute thiblahute commented Mar 20, 2026

The assertion in __syscall_faccessat only allowed AT_EACCESS, causing a crash when AT_SYMLINK_NOFOLLOW was passed (e.g. by GLib's g_local_file_query_exists which uses AT_EACCESS | AT_SYMLINK_NOFOLLOW).

Accept AT_SYMLINK_NOFOLLOW and use it to control whether symlinks are followed during the path lookup.

Copy link
Collaborator

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this.

You you perhaps update the test/unistd/access.c test to cover this new code?

The assertion in __syscall_faccessat only allowed AT_EACCESS, causing
a crash when AT_SYMLINK_NOFOLLOW was passed (e.g. by GLib's
g_local_file_query_exists which uses AT_EACCESS | AT_SYMLINK_NOFOLLOW).

Accept AT_SYMLINK_NOFOLLOW and use it to control whether symlinks are
followed during the path lookup.
@thiblahute thiblahute force-pushed the symlink_nofollow_pr branch from cbd703a to df66538 Compare March 20, 2026 16:49
@thiblahute
Copy link
Contributor Author

I addressed your comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants