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

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Sep 12 14:04:21 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222258

            Bug ID: 222258
           Summary: renameat(2) capability error with absolute path names
                    outside of a sandbox
           Product: Base System
           Version: 11.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: mat at FreeBSD.org
                CC: bapt at FreeBSD.org, emaste at freebsd.org

Created attachment 186296
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=186296&action=edit
kdump output

This week's lang/perl5-devel update brought in a change in the way perl -i -ne
'foo' (equivalent of sed -i -e 'foo') works, it now uses renameat(2).

When using lang/perl5-devel from ports r449631, (and before ports r449684 where
I told Perl not to use the *at functions,) this happens:

# perl5.27.4 -i.bak -ne 's/foo/bar/' /tmp/foo
Can't rename in-place work file '/tmp/f8BoL2A7' to '/tmp/foo': Capabilities
insufficient

It works all right when given a relative path, but not at all if given an
absolute one.

Attached is the output of ktrace that command.

(This is outside of any sandbox.)

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


More information about the freebsd-bugs mailing list