You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Despite become_method being mentioned in the documentation and evaluated when set, containers.podman.podman_unshare is unable to function with any value for become_method other than sudo, due to forcibly injecting sudo-specific CLI parameters without respect for the become method select (so even if you use su, you will still get sudo parameters appended to the attempted call leading to an error.
# podman unshare should be executed in a login shell to avoid chdir permission errors
cmdlist.append('-iu %s'%user)
where the CLI parameters are added despite checking the become method a line earlier; I would think they should be added conditionally (and ideally, become_flags should be respected at that point as well). I'm not sure why become_exe is documented and used at all, it seems sudo is the only possible value that can run without error.
The current code makes it completely impossible to use containers.podman.podman_unshare with a loginless account, the forced injection of -i even prevents you from manually appending -s because -i and -s are mutually exclusive.
The text was updated successfully, but these errors were encountered:
Despite
become_method
being mentioned in the documentation and evaluated when set,containers.podman.podman_unshare
is unable to function with any value forbecome_method
other thansudo
, due to forcibly injectingsudo
-specific CLI parameters without respect for the become method select (so even if you usesu
, you will still getsudo
parameters appended to the attempted call leading to an error.The culprit is in
ansible-podman-collections/plugins/become/podman_unshare.py
Lines 135 to 137 in 181de14
become_flags
should be respected at that point as well). I'm not sure whybecome_exe
is documented and used at all, it seemssudo
is the only possible value that can run without error.The current code makes it completely impossible to use
containers.podman.podman_unshare
with a loginless account, the forced injection of-i
even prevents you from manually appending-s
because-i
and-s
are mutually exclusive.The text was updated successfully, but these errors were encountered: