Repository navigation
Hotfix 4.3.1 - #115
Merged
Merged
Hotfix 4.3.1#115
Conversation
* chore: 4.3.1 is a hotfix of 4.3.0, decided by the maintainer: dosr reads a policy of an older version instead of refusing it, without any change of the format * feat: migration edge from 4.3.0 to 4.3.1, without any change; every released version needs one, otherwise its documents cannot be migrated * tests: a 4.3.0 document goes up to 4.3.1 and back down unchanged, but for its version Co-Authored-By: Claude
…t, with a warning in the log * fix: dosr refused a policy written before 4.1.0, so an upgrade that could not migrate it left the administrator without dosr: the Debian package upgraded through dosr apt upgrade runs its postinst under t_root, without CAP_LINUX_IMMUTABLE, so chsr upgrade cannot write the immutable policy of 4.0.2-2, and every dosr command, dosr chsr upgrade included, then gave "Configuration error"; only a root shell outside dosr could repair it, and the same would happen at each release that migrates the policy * fix: such a policy is read again from the descriptor already checked (owner, permissions, immutable flag), migrated in memory by the migrations of chsr upgrade (read_document and migrate_document of rootasrole-core), and read like a current one; its words keep the meaning that they had for its version: read as they are, the regular expressions of 4.0 (LC_.* in the Debian policy) deny every task that inherits them, and a task in delete mode without keep nor check list gets the lists of the levels above, which 4.0.3 did not give * fix: the log says "<file>: the policy was written by RootAsRole <version>, dosr reads it as chsr upgrade writes it for 4.3.1: upgrade it with chsr upgrade"; the terminal shows nothing of the policy, and dosr writes nothing * fix: a policy without a version, of an invalid or a newer version, or of an older version without a migration to this one, is still refused; a policy that is not older keeps the error of its reading * fix: chsr upgrade --to an older version says that dosr reads the files written for it only through its migrations, without what that version does not know, where it said that dosr refuses them * chore: read_document of rootasrole-core is public, and reads JSON through a buffer * chore: decide, of the fuzzing feature, reads the policy through the same function as dosr * tests: test_find_best_exec_settings_reads_an_older_policy_as_upgraded, in JSON and CBOR: a 4.0.2 policy with LC_.* in the global check list gives KEPT and LC_ALL to the task that inherits the global lists, nothing to the task in delete mode; the same words at the current version deny every task, and with LC_* instead the task in delete mode gets the variables of the global keep and check lists; test_find_best_exec_settings_reads_a_policy_only_at_a_known_version reads 4.0.3, in a file named by the root file and in the root file, and still refuses 3.2.0; test_find_best_exec_settings_versions_in_a_policy_directory, split from it, reads a 4.0.3 CBOR file of a directory; the three fail when dosr refuses an older policy again * tests: e2e.sh policy_without_version_is_refused, and old_policy_is_read_as_upgraded: a 4.0.3 policy file with LC_.*, immutable, lets the test user run id -u as root, the warning is in the journal and nothing on the terminal Co-Authored-By: Claude
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #115 +/- ##
==========================================
- Coverage 80.50% 80.47% -0.04%
==========================================
Files 65 65
Lines 8517 8547 +30
==========================================
+ Hits 6857 6878 +21
- Misses 1660 1669 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
No description provided.