This patch puts dd in capsicum based sandbox.
Sponsored by: Mysterious Code Ltd.
Differential D8543
Capsicumise dd kaktus on Nov 16 2016, 9:37 PM. Authored by Tags Referenced Files
Details This patch puts dd in capsicum based sandbox. Sponsored by: Mysterious Code Ltd. Tested with make test and by hand with various options like seek and skip. Tape _untested_ but it should work as all ioctls related to tape are permitted.
Diff Detail
Event TimelineThere are a very large number of changes, so older changes are hidden. Show Older Changes
Comment Actions @oshogbo @allanjude It works for me, when I test it, so if I can get approval from someone with src commit bit, I am happy to commit it.
Comment Actions I think this looks good, and have asked @oshogbo if he can check again. Also, let me say thank you for your interest and effort in applying Capsicum and submitting these patches. Comment Actions Good work :)
Comment Actions Make it compile on older releases as dd is part of bootstrap and pre 12-C don't have capsicum_helpers.h installed. Tested on 10.3-RELEASE i386 building head r308913. Comment Actions Hi, Thanks for you work, but I like more your previus patch :) Thank you one more time! Comment Actions I think we should have a fake libcapiscim that's all defeined as no-op success functions and add that to libegacy. We don't need to install the full libcapsicim and there's ordering issues trying to do so. However, we don't need it for dd. I have patches in the works that remove the need to make it a bootstrap tool. I'll post a review shortly. So the X is for 'install libcapsicim' not for this patch as it is once I get the Makefile stuff sorted. Comment Actions As I see libcapsicum is header only https://svnweb.freebsd.org/base/head/lib/libcapsicum/Makefile?revision=306726&view=markup. So either we 1) install that lib / header 2) remove dd from bootstrap 3) use the current patch (I agree that this is the less favourable option). I'll leave it up to you guys to decide :-) Comment Actions If you can bootstrap with an old dd binary, sure. Since we no longer build dd as a bootstrap tool, I anticipate that there will be smooth sailing. But test from 10.3R and 11.0R on amd64 just to make sure, along with at least one universe. That's rather the whole reason I did this. :) Comment Actions Update diff with one that survived building head@r309672:
Comment Actions Guys, are we happy with the state of things? I am keen to commit it, given relevant approval is provided. Comment Actions Fix regression when stdin/out/err fds are are overridden by shell. bin/dd/dd_test:io -> passed [0.038s] Comment Actions @ngie Thoughts? I'd like to commit this and move on to other things, so review/approval is highly appreciated. Comment Actions The changes proposed seem ok, in so long as it addresses the regression I reported on svn-src-all@. |