Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

winrm - ensure callers PATH for kinit is set #77401

Merged
merged 3 commits into from Mar 30, 2022

Conversation

jborean93
Copy link
Contributor

SUMMARY

The winrm connection plugin calls kinit in a new subprocess but explicitly defines a new environment dict to run with. This means that any changes in the PATH as seen by the Ansible process are lost causing it to potentially fail to find kinit. By preserving the PATH for this subprocess it will be able to lookup kinit in the same environment as the caller.

Fixes #77390

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

winrm

@ansibot ansibot added affects_2.14 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. windows Windows community labels Mar 29, 2022
@nitzmahone nitzmahone merged commit 60b4200 into ansible:devel Mar 30, 2022
@jborean93 jborean93 deleted the winrm-kinit branch March 30, 2022 00:38
jborean93 added a commit to jborean93/ansible that referenced this pull request Mar 30, 2022
* winrm - ensure callers PATH for kinit is set

* Fix unit test expectations

* Fix type annotation

(cherry picked from commit 60b4200)
jborean93 added a commit to jborean93/ansible that referenced this pull request Mar 30, 2022
* winrm - ensure callers PATH for kinit is set

* Fix unit test expectations

* Fix type annotation

(cherry picked from commit 60b4200)
jborean93 added a commit to jborean93/ansible that referenced this pull request Mar 30, 2022
* winrm - ensure callers PATH for kinit is set

* Fix unit test expectations

* Fix type annotation

(cherry picked from commit 60b4200)
@jborean93
Copy link
Contributor Author

Backport PRs
stable-2.11 - #77402
stable-2.12 - #77403
stable-2.13 - #77404

@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Mar 31, 2022
sivel pushed a commit that referenced this pull request Apr 5, 2022
* winrm - ensure callers PATH for kinit is set

* Fix unit test expectations

* Fix type annotation

(cherry picked from commit 60b4200)
@ansible ansible locked and limited conversation to collaborators Apr 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.14 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. support:core This issue/PR relates to code supported by the Ansible Engineering Team. windows Windows community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Executing kinit for Kerberos not including PATH environment variable
4 participants