Why "yum-plugin-post-transaction-actions" in Red Hat Enterprise Linux does not allow colons in command part ?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • Package: yum-plugin-post-transaction-actions

Issue

  • Why "yum-plugin-post-transaction-actions" in Red Hat Enterprise Linux does not allow colons in command part ?
    Example httpd.action contains colons in the command part
httpd*:any:setfacl -m u:apache:rwx /var/xxxx

Presence of colon in the command section in

 Bad Action Line: <command> 

Resolution

  • A bugreport has been filed with Red Hat Engineering. Contact Red Hat Technical support to know the current status of the bugreport.

  • This issue is fixed in in RHEL 7 and errata update RHBA-2015-0401 is required.

Root Cause

  • For parsing the files in post-action directory, split() function is used and delimiter used is ':' .
  • After parsing the line, only 3 words are expected to be returned by split() function, those are key, state and a command.
  • If command part contains a colon : then an exception "Bad Action Line: " is thrown because only 3 words are expected as output.
    e.g. httpd*:any:setfacl -m u:apache:rwx /var/temp
  • In above example setfacl command is written in command part, and it contains colons causing an exception.
  • Component
  • yum

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments