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

Adding double-quotes around path for Windows 'secedit' command line #13809

Merged
merged 1 commit into from Jul 11, 2023

Conversation

jwdean
Copy link
Contributor

@jwdean jwdean commented Jun 15, 2023

Description

The windows_security_policy resource uses the Windows command line tool secedit to modify configuration. This command line includes the path to a temporary file stored in a user-specific temporary directory. If the username of the user running chef-client includes a space, then the command line is built without quotes around the path which can cause secedit to fail.

Related Issue

fixes #13791

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

fixes chef#13791

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the
    best of my knowledge, is covered under an appropriate open
    source license and I have the right under that license to
    submit that work with modifications, whether created in whole
    or in part by me, under the same open source license (unless
    I am permitted to submit under a different license), as
    Indicated in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including
    all personal information I submit with it, including my
    sign-off) is maintained indefinitely and may be redistributed
    consistent with this project or the open source license(s)
    involved.

Signed-off-by: Jeff Dean <jwdean@scriptpro.com>
@jwdean jwdean requested review from a team as code owners June 15, 2023 14:39
@github-actions github-actions bot added the documentation How do we use this project? label Jun 15, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jun 15, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@johnmccrae johnmccrae merged commit 13f8685 into chef:main Jul 11, 2023
22 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation How do we use this project?
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<windows_security_policy resource fails when username of the user running the converge includes a space
3 participants