[Bug 275295] Linuxulator: faccessat2 unsupported flag 0x100

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 09 Aug 2024 17:55:36 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275295

Fernando ApesteguĂ­a <fernape@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fernape@FreeBSD.org

--- Comment #7 from Fernando ApesteguĂ­a <fernape@FreeBSD.org> ---
Created attachment 252634
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=252634&action=edit
Patch to support AT_SYMLINK_NOFOLLOW in faccess(2)

I gave this a try and came up with this patch. It adds support for
AT_SYMLINK_NOFOLLOW in faccessat(2) and it removes the restriction in
linux_faccessat2. I didn't test the linuxolator part though.

Would you test it? You don't need to build world, that is only to update a
couple of manual pages.

I tested this with access_test.c and the following files:

~/test$ ls -l file link_to_file
--w-------  1 fernape fernape 0 Jul 29 19:23 file
lrwxr-xr-x  1 fernape fernape 4 Jul 29 19:23 link_to_file@ -> file

~/test$ ./a.out file link_to_file 
accessat: Permission denied
accessat: Permission denied
With AT_SYMLINK_NOFOLLOW:
accessat: Permission denied
link is accessible

-- 
You are receiving this mail because:
You are the assignee for the bug.