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)
Feb 15 2025, 4:45 PM
Unknown Object (File)
Feb 15 2025, 3:31 PM
Unknown Object (File)
Feb 15 2025, 3:26 PM
Unknown Object (File)
Feb 15 2025, 3:14 PM
Unknown Object (File)
Feb 13 2025, 3:21 PM
Unknown Object (File)
Feb 13 2025, 12:53 PM
Unknown Object (File)
Feb 6 2025, 5:48 PM
Unknown Object (File)
Jan 26 2025, 6:17 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 Not Applicable
Unit
Tests Not Applicable

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.