Page MenuHomeFreeBSD

cat: capsicumize it
ClosedPublic

Authored by oshogbo on Jan 10 2021, 11:53 AM.

Diff Detail

Repository
R10 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

bin/cat/cat.c
130

Don't we need to check for failure?

454

Limit rights?

This revision is now accepted and ready to land.Jan 15 2021, 6:51 PM

I believe this will break the bootstrap version of cat that is needed for building on Linux/macOS since caph_enter_casper() will fail there.
This probably needs a few more #ifndef BOOTSTRAP_CAT.
If you have a github fork, the github actions will test the non-FreeBSD build automatically for the "main" branch of your repository.

Otherwise this seems fine to me.

This revision now requires changes to proceed.Jan 15 2021, 6:55 PM

@arichardson

Yea, I wasn't sure about Linux/macOs build.
Good to know that! I will verify that!
We don't use the rescue headers to build a BOOTSTRAP version?

@arichardson

Yea, I wasn't sure about Linux/macOs build.
Good to know that! I will verify that!
We don't use the rescue headers to build a BOOTSTRAP version?

The bootstrap version uses tools/build/cross-build/capsicum_stubs.c . I'm not sure what you mean by rescue head?

@arichardson
I just needed to add a new service to the tools/build/Makefile and it work like charm - https://github.com/oshogbo/freebsd-src/runs/1710760934 (mac will finish in a moment).
Do you want me to test something else?

So in the case of the building rescue and the bootstrapping, we are using the libcapsicum/Casper headers that replace the caph_* functions with empty ones.

@arichardson
I just needed to add a new service to the tools/build/Makefile and it work like charm - https://github.com/oshogbo/freebsd-src/runs/1710760934 (mac will finish in a moment).
Do you want me to test something else?

So in the case of the building rescue and the bootstrapping, we are using the libcapsicum/Casper headers that replace the caph_* functions with empty ones.

Thanks for checking!

This revision is now accepted and ready to land.Jan 15 2021, 7:58 PM
This revision was automatically updated to reflect the committed changes.