Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
podman exec currently only supports --env which could leak environment variables via ps and results in very long command lines if there are a bunch of vars. It would be beneficial for exec to support --env-file as well.
Version-Release number of selected component (if applicable):
any
How reproducible:
every time
Steps to Reproduce:
1.
[user@myhost ~]$ sudo podman exec --env VARI=foo -it -u root mysql /bin/bash
()[root@myhost /]#
2.
[user@myhost ~]$ ps aux | grep VARI
root 504494 0.0 0.0 241172 4600 pts/2 S+ 15:00 0:00 sudo podman exec --env VARI=foo -it -u root mysql /bin/bash
root 504496 0.4 0.2 701452 42108 pts/2 Sl+ 15:00 0:00 podman exec --env VARI=foo -it -u root mysql /bin/bash
centos 504613 0.0 0.0 112708 980 pts/4 S+ 15:00 0:00 grep --color=auto VARI
Actual results:
--env shows up in cmd line
Expected results:
--env-file could be used to reduce the cmd line length (if lots of vars) and if there are sensitive variables.
Additional info:
Test with podman-1.9.3-2.module+el8.2.1+6867+366c07d6.x86_64 and the env-file works, so set this to verified. Details:
# podman run -d --name test busybox top
6450cad3a1f5200c60d3513f2085263344098502629756f9d953fb883fe095e2
# podman exec --env-file envtest -it test /bin/sh
/ # echo $a $b
hello world
/ # exit
# cat envtest
a=hello
b=world
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2020:3053