Skip to content

Update ssh folder permissions check in SSHD - #761

Merged
Tess Gauthier (tgauth) merged 15 commits into
PowerShell:latestw_allfrom
tgauth:update-perm-check
Jan 10, 2025
Merged

Tess Gauthier (tgauth) merged 15 commits into
PowerShell:latestw_allfrom
tgauth:update-perm-check

Conversation

@tgauth

@tgauth Tess Gauthier (tgauth) commented Nov 11, 2024 •

Copy link
Copy Markdown
Collaborator

PR Summary

  • change sshd startup permissions check to log message to event viewer, rather than fail if expected permissions are not found
  • limit sshd startup permissions check to just ProgData\ssh folder, not ProgData\ssh\logs folder
  • add Pester Test for startup scenario
  • sample logging message:
image

PR Context

Comment thread regress/pesterTests/Setup.Tests.ps1 Resolved
@tgauth

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@tgauth

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@tgauth

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@tgauth

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@tgauth

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@tgauth
Tess Gauthier (tgauth) merged commit b36bc85 into PowerShell:latestw_all Jan 10, 2025
@tgauth
Tess Gauthier (tgauth) deleted the update-perm-check branch January 10, 2025 15:47
Hazel Duvall (hazelduvall) pushed a commit to hazelduvall/openssh-portable that referenced this pull request May 6, 2026
* remove check on progdata/ssh/log folder permissions

* add pester test

* modify permissions check to log event without failing startup

* modify perm check

* update test

* uncomment code

* modify pester test

* address review feedback

* address review feedback

* fix multi-line logging

* cleanup allocations

* address review feedback

* address additional review feedback

* store value in tmp var
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v9.4.0.0p1 and later enforce permissions on the logs folder, leading to undiagnosable crashes of the service after Windows Update

3 participants