[Bug 198570] Add fnctl(F_GETPATH) support to FreeBSD

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 10 Oct 2021 12:30:04 UTC

Greg V <greg@unrelenting.technology> changed:

           What    |Removed                     |Added
                 CC|                            |greg@unrelenting.technology

--- Comment #3 from Greg V <greg@unrelenting.technology> ---
Now we do have O_PATH with corresponding operations (bug 197778) but so far
I've found a few reasons to "getpath" on these when working on

- extattr_set_fd/extattr_delete_fd don't work with O_PATH, returning EBADFD
(there's no space for an AT_EMPTY_PATH type flag in the API but maybe they
should Just Work since these aren't *at calls, I'll try to patch this probably)
- linkat(AT_EMPTY_PATH) requires root privileges!? (was there no better, less
restrictive way to deal with the security issues?)
- sometimes the program literally just needs to read the damn path to return to

Now, I wonder if KERN_PROC_FILEDESC is guaranteed to be reliable on O_PATH

(Wait, do we even have the "broken filedesc" problem anymore? We do have
fdescfs with the linrdlnk mount option, which basically provides the Linux
style symlink API, and it's not "debugging only"!)

You are receiving this mail because:
You are the assignee for the bug.