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

Linking RHIVOS CVEs to...Migration: Automation ...RHELPRIO AssignedTeam ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Normal Normal
    • rhel-9.7
    • rhel-8.10, rhel-9.4
    • libdnf
    • libdnf-0.69.0-14.el9
    • No
    • Moderate
    • rhel-swm
    • ssg_core_services
    • 8
    • 10
    • 0
    • False
    • False
    • Hide

      None

      Show
      None
    • No
    • Red Hat Enterprise Linux
    • None
    • Hide

      Proposed AC:

      A warning is printed to the user if the module configuration file exists but is inaccessible (e.g., due to insufficient permissions), indicating potential issues with modular filtering.

      Show
      Proposed AC: A warning is printed to the user if the module configuration file exists but is inaccessible (e.g., due to insufficient permissions), indicating potential issues with modular filtering.
    • Pass
    • Automated
    • Unspecified Release Note Type - Unknown
    • 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

              mblaha@redhat.com Marek Blaha
              rhn-support-rmetrich Renaud Métrich
              packaging-team-maint packaging-team-maint
              Martin Banas Martin Banas
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: