You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
store: Centralize composefs directory creation with mode 0700
The install-time composefs directory creation in repo.rs used
create_dir_all() which relies on the process umask for permissions,
potentially creating /sysroot/composefs with overly permissive modes
and leaking information.
Centralize the directory creation into a new ensure_composefs_dir()
helper in store/mod.rs that explicitly sets mode 0700. Both the
install-time path (repo.rs) and the runtime lazy-init path
(Storage::get_ensure_composefs) now use this single helper. The
helper also always updates permissions on existing directories, so
systems installed with an older version of bootc will have their
composefs directory permissions corrected on upgrade.
Also removes #[allow(dead_code)] from COMPOSEFS_MODE since it is now
actively used, and adds unit tests verifying the directory permissions,
idempotency, and correction of pre-existing wrong permissions.
Assisted-by: OpenCode (claude-opus-4-6)
0 commit comments