Page MenuHomeFreeBSD

ficl pfopen: verify file
ClosedPublic

Authored by sjg on May 23 2019, 8:10 PM.

Details

Summary

If the file is verified - do not allow write
otherwise do not allow read.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

sjg created this revision.May 23 2019, 8:10 PM
sjg updated this revision to Diff 57797.May 23 2019, 8:14 PM

Add ficl.mk

stevek added inline comments.May 23 2019, 9:27 PM
stand/ficl/loader.c
509 ↗(On Diff #57797)

I believe this should be written like so:
if ((mode & O_ACCMODE) != O_WRONLY) {

515 ↗(On Diff #57797)

Similar thing here:
if ((mode & O_ACCMODE) != O_RDONLY) {

sjg updated this revision to Diff 57803.May 23 2019, 9:33 PM

Use O_ACCMODE

sjg marked 2 inline comments as done.May 23 2019, 9:33 PM

Good point

sjg updated this revision to Diff 57805.May 23 2019, 9:43 PM

stand.h needs to define O_ACCMODE

Did some basic testing and it looks ok.

This revision is now accepted and ready to land.May 24 2019, 7:33 AM
stevek accepted this revision.May 24 2019, 5:58 PM
This revision was automatically updated to reflect the committed changes.