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
F161153203: D29108.diff
Wed, Jul 1, 1:09 AM
Unknown Object (File)
Sun, Jun 28, 11:44 PM
Unknown Object (File)
Tue, Jun 16, 12:39 PM
Unknown Object (File)
Mon, Jun 15, 6:16 PM
Unknown Object (File)
Mon, Jun 15, 5:11 PM
Unknown Object (File)
Mon, Jun 15, 4:35 PM
Unknown Object (File)
Mon, Jun 15, 4:01 PM
Unknown Object (File)
Mon, Jun 15, 3:52 PM
Subscribers

Details

Summary

This fixes rsyslog package installation scripts in Bionic.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 38589
Build 35478: arc lint + arc unit

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
1741–1742

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
1751

Extra ()

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

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