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

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

    •  fapolicyd-1.4.1-1.el9
    • No
    • Moderate
    • 1
    • rhel-security-selinux
    • ssg_security
    • 11
    • 2
    • QE ack
    • False
    • False
    • Hide

      None

      Show
      None
    • No
    • Red Hat Enterprise Linux
    • SELINUX 251119: 15
    • Hide

      The fapolicyd service does not complain about the last line of its configuration file being too long.

      Show
      The fapolicyd service does not complain about the last line of its configuration file being too long.
    • Pass
    • Automated
    • Unspecified Release Note Type - Unknown
    • 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
      

              rhn-engineering-plautrba Petr Lautrbach
              rhn-support-rmetrich Renaud Métrich
              Milos Malik Milos Malik
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated: