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

win_credential - fix wildcard name #67549

Merged
merged 1 commit into from
Feb 18, 2020

Conversation

jborean93
Copy link
Contributor

SUMMARY

Due to PowerShell changing $null to be "" when calling a .NET function the call to CredWriteW was trying to write an empty string for Comment and TargetAlias. This was problematic as it doesn't seem like you can set an alias when using a wildcard server and "" is not considered NULL.

This PR ensures we set those attributes to [NullString]::Value which preserves $null when crossing that boundary. This ensures that when we set a wildcard name there is no actual alias being set at the same time.

Fixes #67278

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

win_credential

@ansibot
Copy link
Contributor

ansibot commented Feb 18, 2020

@ansibot ansibot added affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. has_issue module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. windows Windows community labels Feb 18, 2020
@jborean93 jborean93 merged commit d705988 into ansible:devel Feb 18, 2020
@jborean93 jborean93 deleted the win_credential_wildcard branch February 18, 2020 21:43
jborean93 added a commit to jborean93/ansible that referenced this pull request Feb 18, 2020
@jborean93
Copy link
Contributor Author

Backport PR to stable-2.9 #67552

@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Feb 19, 2020
mattclay pushed a commit that referenced this pull request Mar 3, 2020
@ansible ansible locked and limited conversation to collaborators Mar 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. has_issue module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community. 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.

win_credential unable to use the wildcard character
3 participants