Description of problem: If the path is set to include /etc/cron.daily before /bin (either directly or using '.') then executing /etc/cron.daily/rpm causes the machine to go into an infinite loop and probably die because the script /etc/cron.daily/rpm tries to run the rpm command, but instead of finding /bin/rpm it finds /etc/cron.daily/rpm instead which re-executes the script which continues over and over again. Version-Release number of selected component (if applicable): 4.3.3-18_nonptl Steps to Reproduce: 1. Run: export PATH=/etc/cron.daily:$PATH (alternatively export PATH=.:$PATH 2. Run: rpm Actual results: Machine dies Expected results: Machine doesn't die Additional info: It is an unusual situation, but given the drastic consequences if the bug is triggered it may be worth fixing. It could be fixed in a number of ways: 1. Explicitly setting the path from within the /etc/cron.daily/rpm script 2. Renaming the script from /etc/cron.daily/rpm to something else, e.g. /etc/cron.daily/rpmpkgs 3. Calling "/bin/rpm" from within /etc/cron.daily/rpm rather than just "rpm"
Here's the daily script from rpm-4.4.8: #!/bin/sh /usr/bin/rpmquery -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' 2>&1 \ | sort > /var/log/rpmpkgs
We got bit by this here recently -- an overzealous admin moved the /etc/cron.daily script out to somewhere in root's path, and subsequent rpm commands triggered recursive execution as well. Backporting the daily script from rpm-4.4.8 seems like an easy fix.
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. Please See https://access.redhat.com/support/policy/updates/errata/ If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.