Re: bhyve fopen failure

From: Conrad Meyer <cem_at_freebsd.org>
Date: Tue, 2 Mar 2021 10:07:54 -0800
Hi Chuck,

In capability mode (capsicum sandbox), files like this need to be opened
before bhyve enters sandboxed mode.  (That’s ‘cap_enter()’.)

Best,
Conrad

On Tue, Mar 2, 2021 at 09:31 Chuck Tuffli <chuck_at_freebsd.org> wrote:

> I'm porting some code to bhyve and am getting a failure I don't
> understand. This is git as of af11c2029006 FWIW.
>
> The code in question is for an emulated device and looks like:
>     dbg = fopen("/tmp/bhyve_ata.log", "w+");
>     if (dbg == NULL)
>         perror("fopen");
>
> Running this fails with:
>     fopen: Not permitted in capability mode
> Googling suggests this might be capsicum related. If so, what do I
> need to change to allow writes to a debug file?
>
> --chuck
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
>
Received on Tue Mar 02 2021 - 17:08:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:27 UTC