Skip to content

Hotfix 4.3.1 - #115

Merged
LeChatP merged 5 commits into
mainfrom
hotfix-4.3.1
Nov 8, 2026
Merged

LeChatP merged 5 commits into
mainfrom
hotfix-4.3.1

Conversation

@LeChatP

@LeChatP LeChatP commented Nov 8, 2026

Copy link
Copy Markdown
Owner

No description provided.

* 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

codecov Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.84615% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.47%. Comparing base (9ab0f81) to head (cd24d03).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/dosr/finder/mod.rs 77.77% 10 Missing ⚠️
src/dosr/fuzzing.rs 75.00% 1 Missing ⚠️
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     
Flag Coverage Δ
admin-unittests 80.44% <78.84%> (-0.04%) ⬇️
unittests 79.73% <78.84%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@LeChatP
LeChatP merged commit 9018f72 into main Nov 8, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant