Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
module: Warn if module config file is inaccessible
If a DNF module configuration file is unreadable, `dnf` may return unexpected results without warning the user, potentially affecting command output. Steps to reproduce: 1. Enable the `nginx` module as root with a restrictive `umask`, making the config file unreadable for normal users: # umask 0066 # dnf module enable nginx:1.24 # ls -l /etc/dnf/modules.d/nginx.module -rw-------. 1 root root 55 Oct 16 09:59 /etc/dnf/modules.d/nginx.module 2. Check available packages as root (CORRECT): # dnf list --available nginx [...] Available Packages nginx.x86_64 1:1.24.0-1.module+el9.4.0+21950+8ebc21e2.1 3. Check available packages as a normal user (INCORRECT): $ dnf list --available nginx [...] Available Packages nginx.x86_64 1:1.20.1-16.el9_4.1 This patch introduces a warning when a module config file exists but is inaccessible, helping users diagnose potential issues: $ dnf list --available nginx [...] Cannot read "/etc/dnf/modules.d/nginx.module". Modular filtering may be affected. Available Packages nginx.x86_64 1:1.20.1-16.el9_4.1 Resolves: https://issues.redhat.com/browse/RHEL-62833
- Loading branch information