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

/usr/lib/systemd/system/sa-update.service contains not honored Environment options/comments

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • rhel-9.3.0
    • spamassassin
    • None
    • None
    • Low
    • rhel-sst-cs-stacks
    • ssg_core_services
    • None
    • False
    • Hide

      None

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

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

      Through digging an SELinux alert I found that options mentioned in /usr/lib/systemd/system/sa-update.service are not even honored

      Please provide the package NVR for which bug is seen:

      rpm -qf /usr/lib/systemd/system/sa-update.service 

      spamassassin-3.4.6-5.el9.x86_64

      How reproducible: always

      Steps to reproduce

      • create override file
      cat /etc/systemd/system/sa-update.service.d/override.conf 
      [Service]
      Environment=OPTIONS="-v -D"
      Environment=DEBUG=yes
      • reload systemd
      systemctl daemon-reload
      • start unit (just note for testing purposes, the "sleep" in "/usr/share/spamassassin/sa-update.cron" was disabled
      systemctl start sa-update.service
      • watch journal
      journalctl -f -u sa-update.service
      Feb 24 06:49:49 host systemd[1]: Started Spamassassin Rules Update.
      Feb 24 06:49:51 host systemd[1]: sa-update.service: Deactivated successfully.
      Feb 24 06:49:51 host systemd[1]: sa-update.service: Consumed 1.162s CPU time.

      Expected results

      Debug messages in journal

      Actual results

      No debug messages in journal

      Further investigations

      The definitions in unit file are useless, because "/usr/share/spamassassin/sa-update.cron" explicit unset supported options by

      unset SAUPDATE OPTIONS DEBUG NOTIFY_UPD

      before reading them from file "/etc/sysconfig/sa-update"

      Potential fix: replace the useless part in unit file and refer to config file only

              rhn-support-mosvald Martin Osvald (Inactive)
              pb_bieringer Peter Bieringer (Inactive)
              Martin Osvald Martin Osvald (Inactive)
              Frantisek Hrdina Frantisek Hrdina
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: