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

fapolicyd skips last line of configuration file when it's not ending with a newline

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • rhel-9.7
    • rhel-9.4
    • fapolicyd
    • None
    • No
    • Moderate
    • rhel-sst-security-special-projects
    • ssg_security
    • 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?

      When /etc/fapolicyd/fapolicyd.conf last line isn't EOL terminated, fapolicyd skips the line, as seen in the journal:

      [...] fapolicyd[1562]: Skipping line 21 in /etc/fapolicyd/fapolicyd.conf: too long
      

      What is the impact of this issue to you?

      Potential misconfiguration

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

      fapolicyd-1.3.2-100.el9

      How reproducible is this bug?:

      Always

      Steps to reproduce

      1. Delete some line
        # sed -i "/^integrity/d" /etc/fapolicyd/fapolicyd.conf
      2. Add last line without EOL
        # echo -n "integrity = sha256" >> /etc/fapolicyd/fapolicyd.conf
      3. Start the service

      Expected results

      No warning and value integrity = sha256 taken into account.

      Actual results

      Warning + fapolicyd not enabling integrity checking:

      [...] fapolicyd[1977]: Skipping line 21 in /etc/fapolicyd/fapolicyd.conf: too long
      [...] fapolicyd[1978]: fapolicyd integrity is 0
      

              rsroka@redhat.com Radovan Sroka
              rhn-support-rmetrich Renaud Métrich
              Radovan Sroka Radovan Sroka
              SSG Security QE SSG Security QE
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: