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)
Oct 18 2024, 3:02 AM
Unknown Object (File)
Oct 2 2024, 5:18 AM
Unknown Object (File)
Oct 1 2024, 5:00 AM
Unknown Object (File)
Sep 30 2024, 9:20 AM
Unknown Object (File)
Sep 28 2024, 2:35 AM
Unknown Object (File)
Sep 26 2024, 2:55 PM
Unknown Object (File)
Sep 26 2024, 12:06 AM
Unknown Object (File)
Sep 22 2024, 7:28 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 58982
Build 55869: 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

This line should be wrapped.

sys/kern/vfs_syscalls.c
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

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.