Re: bhyve fopen failure

2021-03-04 Thread Chuck Tuffli
On Tue, Mar 2, 2021 at 10:13 AM Mark Johnston wrote: > > On Tue, Mar 02, 2021 at 09:31:22AM -0800, Chuck Tuffli 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

Re: bhyve fopen failure

2021-03-02 Thread Mark Johnston
On Tue, Mar 02, 2021 at 09:31:22AM -0800, Chuck Tuffli 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+"); >

Re: bhyve fopen failure

2021-03-02 Thread Conrad Meyer
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 wrote: > I'm porting some code to bhyve and am getting a failure I don't > understand. This is

bhyve fopen failure

2021-03-02 Thread Chuck Tuffli
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: f