bscrypto: fix and update code, and move CLI parsing to cli11#1350
Closed
alaaeddineelamri wants to merge 40 commits intobareos:masterfrom
Closed
bscrypto: fix and update code, and move CLI parsing to cli11#1350alaaeddineelamri wants to merge 40 commits intobareos:masterfrom
alaaeddineelamri wants to merge 40 commits intobareos:masterfrom
Conversation
4200545 to
3ae1268
Compare
1e1fd5e to
549b375
Compare
549b375 to
c7d3656
Compare
7fec029 to
a06f9a0
Compare
a06f9a0 to
fd591fb
Compare
This reverts commit 64101cd370cad47f3ebc86af4db58b6c6a58911f.
Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
Without the quote example in copy and paste call the second and beyond tape drives are called by sh (due to ; separator) Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
- add sudoers.d/build.in configuration as sample - test-setup will start/stop mhvtl.target and add blank medias These tests need to have the autochanger and tapes flag for cmake enabled and use mhvtl (preferably >1.7-0).
`bstrncpy` makes sure the destination string is always null terminated, which results in the last character of the string being replaced with `0` which in turn makes the passphrase string missing its last character
Co-authored-by: Bruno Friedmann <bruno.friedmann@bareos.com>
Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
fd591fb to
c1a1bd7
Compare
passphrase is not a cstring (no null terminator) so it cannot be printed with %s; bstrncpy can copy length + 1 bytes but only length bytes were allocated; etc.
cc574a4 to
ef81834
Compare
let the comment about the problem: it look like tools load a key into the drive bscrypto -e -v show them enable, but bls/bextract failed to read block (label uncrypted is ok)
Contributor
|
Last stage of fixes to be done: When used by the tools the key in log output is not similar than during backup/restore |
Contributor
if (dcr->jcr && dcr->jcr->sd_impl->director) {
director = dcr->jcr->sd_impl->director;
if (director->keyencrkey.value) {
[...]These values need to exist for unwrapping to occur. Seems like this is not the case when the tools are used. |
add --director mandatory configuration parameter for tools to precise which KEK has to be used.
13 tasks
Contributor
|
Closing the work is now happening in #1734 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for contributing to the Bareos Project!
Description
This PR moves CLI parsing of bscrypto to CLI11, along with some code updates and refactoring.
Please check
If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
General
Source code quality
bareos-check-sources --since-mergedoes not report any problemsTests