Bug 2189582

Summary: Remove default pre-exec hook directories.
Product: Red Hat Enterprise Linux 9 Reporter: Tom Sweeney <tsweeney>
Component: podmanAssignee: Tom Sweeney <tsweeney>
Status: CLOSED MIGRATED QA Contact: atomic-bugs <atomic-bugs>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 9.3CC: atomic-bugs, bbaude, dwalsh, jligon, jnovy, lsm5, mboddu, mheon, pthomas, tsweeney, umohnani
Target Milestone: rcKeywords: MigratedToJIRA, Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2189578
: 2189592 (view as bug list) Environment:
Last Closed: 2023-09-11 20:14:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2189578    
Bug Blocks: 2189592    

Description Tom Sweeney 2023-04-25 15:50:12 UTC
+++ This bug was initially created as a clone of Bug #2189578 +++

Description of problem:

Currently, Podman searches the directories /usr/libexec/podman/pre-exec-hooks or /etc/containers/pre-exec-hooks on the host machine, and if there are any scripts in those directories, they are run at the startup of the container.  Per RHEL Security Alert, we should not do this.  Instead, we should use a configurable option to allow this to happen or use an environment variable to specify the directory.

The longer-term fix is to add an option somewhere to allow for those directories to be used.  However, given the ZeroDay deadline, for that release, we will be just using the environment variable: PODMAN_PREEXEC_HOOKS_DIR.  If that EnVar is defined, scripts in the specified directory will be run.  If not specified, any scripts found in the suggested directories: /usr/libexec/podman/pre-exec-hooks or /etc/containers/pre-exec-hooks will not be run at the container startup.  


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 RHEL Program Management 2023-09-11 20:11:37 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 4 RHEL Program Management 2023-09-11 20:14:00 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.