Page MenuHomeFreeBSD

linux: support AT_EMPTY_PATH flag in fchownat(2)
ClosedPublic

Authored by trasz on Mar 6 2021, 8:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 15, 9:38 AM
Unknown Object (File)
Dec 22 2023, 10:31 PM
Unknown Object (File)
Sep 11 2023, 7:21 AM
Unknown Object (File)
Aug 24 2023, 4:10 AM
Unknown Object (File)
Aug 15 2023, 12:45 PM
Unknown Object (File)
Aug 15 2023, 9:37 AM
Unknown Object (File)
Jul 14 2023, 8:52 AM
Unknown Object (File)
Jul 3 2023, 1:57 AM
Subscribers

Details

Summary

This fixes rsyslog package installation scripts in Bionic.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

trasz requested review of this revision.Mar 6 2021, 8:04 PM

I think the flag should be implemented on the FreeBSD side.

Also, your patch does not handle AT_FDCWD case, that is described in the Linux man page.

sys/compat/linux/linux_file.c
1743–1744

You broke detection of the unknown flags.

Fix unknown flag detection, detect AT_FDCWD.

I've considered doing it natively first - that would allow us to support AT_FDCWD with AT_EMPTY_PATH - but after a few hours I gave up. I'd strongly prefer committing this small change instead of making another attempt at understanding namei().

BTW there are more Linux syscalls taking AT_EMPTY_PATH

sys/compat/linux/linux_file.c
1753

Extra ()

This revision is now accepted and ready to land.Apr 15 2021, 12:46 PM
sys/compat/linux/linux_file.c
1753

This is copy/pasted all over the tree; I'll fix it in a later sweep.