Page MenuHomeFreeBSD

faccessat(2): Honor AT_SYMLINK_NOFOLLOW
ClosedPublic

Authored by fernape on Aug 10 2024, 11:45 AM.
Tags
None
Referenced Files
F133181987: D46267.diff
Thu, Oct 23, 6:12 PM
F133181186: D46267.diff
Thu, Oct 23, 6:03 PM
Unknown Object (File)
Wed, Oct 22, 12:11 AM
Unknown Object (File)
Sun, Oct 5, 4:43 AM
Unknown Object (File)
Sun, Sep 28, 4:08 PM
Unknown Object (File)
Sun, Sep 28, 8:43 AM
Unknown Object (File)
Sep 16 2025, 4:50 PM
Unknown Object (File)
Sep 15 2025, 8:10 AM
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 58984
Build 55871: 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
2155–2156

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

2156

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.