Bug 174211
Summary: | cron.daily/rpm should have other name than rpm | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Sergio Basto <sergio> |
Component: | rpm | Assignee: | Paul Nasrat <nobody+pnasrat> |
Status: | CLOSED RAWHIDE | QA Contact: | Mike McLean <mikem> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 4 | CC: | mej |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | rpm-4.4.2-11 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-12-01 13:40:28 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Sergio Basto
2005-11-25 22:40:54 UTC
Having '.' in PATH as root is heavily discouraged, for reasons such as the above (consider /tmp where all users can write for example) well the problem is not the . in PATH, the problem is having 2 executables with the same name. Try put in PATH /etc/cron.daily/ before /usr/bin and see what happens when run /etc/cron.daily/rpm . This have 2 problems /etc/cron.daily/rpm call rpm without PATH so bash have to looking in the path for a rpm which could be himself. Do you understand what is my point ? The root cause of your problem is having '.' in a path causing the script to be in your PATH. I as a malicous user can create a +s shell add a new uid 0 user or any number of things in /tmp/rpm or /tmp/anylikelycommand if you have . in PATH as root and are not careful. /etc/cron.daily should never be in any sane PATH so normal users don't care. Well , I give up , this discussion don't go anywhere, but keep in mind, for me, the problem is having two executables files called rpm one /bin/rpm and other /etc/cron.daily/rpm and /etc/cron.daily/rpm call rpm without any PATH. if /etc/cron.daily/rpm call /bin/rpm, I won't have this problem. The problem is not that the /etc/cron.daily/rpm script is named rpm. The problem is that it doesn't give an absolute path to /bin/rpm when invoking it, nor does it reset the PATH variable to a well-defined secure value. This is indeed a potential risk. This should be reopened. rpm-4.4.2-11 |