Page MenuHomeFreeBSD

faccessat(2): Honor AT_SYMLINK_NOFOLLOW
ClosedPublic

Authored by fernape on Aug 10 2024, 11:45 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jul 17, 4:01 AM
Unknown Object (File)
Mon, Jul 7, 5:56 AM
Unknown Object (File)
Mon, Jun 30, 11:30 AM
Unknown Object (File)
Sun, Jun 29, 7:44 AM
Unknown Object (File)
Jun 27 2025, 2:58 AM
Unknown Object (File)
Jun 25 2025, 12:21 PM
Unknown Object (File)
Jun 23 2025, 10:49 PM
Unknown Object (File)
Jun 23 2025, 9:11 PM
Subscribers

Details

Summary

Make the system call honor AT_SYMLINK_NOFOLLOW.

Also enable this from linux_faccessat2 where the issue arised the first time.
Update manual pages accordingly.

PR: 275295

Test Plan

Apply the patch and use a simple program to test the system call.
One such program can be found here.

AFAICT, this change is POSIX-compliant.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 58986
Build 55873: arc lint + arc unit

Event Timeline

fernape edited the test plan for this revision. (Show Details)
fernape added a reviewer: kib.

Do not forget to bump the man page's dates.

sys/compat/linux/linux_file.c
639โ€“640

This line should be wrapped.

sys/kern/vfs_syscalls.c
2154โ€“2155

The line should be wrapped. I do not see a need to add {} around the body.

In D46267#1055079, @kib wrote:

Do not forget to bump the man page's dates.

Yes, I will bump .Dd at commit time.

sys/compat/linux/linux_file.c
640

Indent for the continuation line should be +4 spaces

sys/kern/vfs_syscalls.c
46

Stray chunk

2155

Again, indent should be +4 spaces

  • Use +4 spaces for indentation.
fernape marked 2 inline comments as done.
  • Remove stray change.
This revision is now accepted and ready to land.Aug 11 2024, 12:19 PM
This revision was automatically updated to reflect the committed changes.