Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-62833

dnf doesn't warn the user when a file is not accessible, which may lead to discrepancies in the command output

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-8.10, rhel-9.4
    • dnf
    • None
    • No
    • Moderate
    • rhel-sst-cs-software-management
    • ssg_core_services
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • None

      What were you trying to do that didn't work?

      If for some reason a DNF module configuration file is not readable by a non-root user, the dnf command will return an unexpected result without printing any warning on the inaccessible configuration file, which may influence the output.
       

      What is the impact of this issue to you?

      Confusion

      Please provide the package NVR for which the bug is seen:

      dnf-4.7.0-20.el8.noarch
      dnf-4.14.0-9.el9.noarch

      How reproducible is this bug?:

      Always

      Steps to reproduce

      1.  Enable the nginx module as root while changing the umask to have the file be created non-readable by 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
        
      1. Check latest available as root user (CORRECT)
        # dnf list available nginx
        [...]
        Available Packages
        nginx.x86_64            1:1.24.0-1.module+el9.4.0+21950+8ebc21e2.1
        
      1.  Check latest available as normal user (INCORRECT)
        $ dnf list available nginx
        [...]
        Available Packages
        nginx.x86_64            1:1.20.1-16.el9_4.1
        

      Expected results

      A warning stating that /etc/dnf/modules.d/nginx.module could not be processed, hence output may be unexpected.

      Actual results

      No warning on the output

              packaging-team-maint packaging-team-maint
              rhn-support-rmetrich Renaud Métrich
              packaging-team-maint packaging-team-maint
              Software Management QE Software Management QE
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: