[Bug 222258] renameat(2) capability error with absolute path names outside of a sandbox

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Sep 14 00:02:59 UTC 2017


tony at develop-help.com changed:

           What    |Removed                     |Added
                 CC|                            |tony at develop-help.com

--- Comment #2 from tony at develop-help.com ---
Yes, the code grabs a handle to the cwd when opening the file for -i and uses
that handle when cleaning up when the file is closed, in this specific case
when renaming the original file to a backup file, or renaming the work file
over the original file.

If we were passing AT_FDCWD we could just call rename().

I have a workaround patch (for perl) that calls rename() for absolute paths on
FreeBSD if Mathieu wants to try it on the tonyc/127663-freebsd-renameat branch
in the perl5 git at git://perl5.git.perl.org/perl.git

I do wonder if renameat() will behave correctly in a container on FreeBSD.

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

More information about the freebsd-bugs mailing list