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)
Fri, Jan 24, 5:52 PM
Unknown Object (File)
Thu, Jan 23, 6:51 PM
Unknown Object (File)
Thu, Jan 23, 6:37 PM
Unknown Object (File)
Thu, Jan 23, 6:29 PM
Unknown Object (File)
Thu, Jan 23, 4:42 PM
Unknown Object (File)
Sat, Jan 18, 9:09 AM
Unknown Object (File)
Fri, Jan 17, 8:58 PM
Unknown Object (File)
Tue, Jan 14, 2:56 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 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.