Skip to content

Fix SSPI acceptor credentials#857

Open
elric1 wants to merge 1 commit into
PowerShell:latestw_allfrom
chapeltech:sspi-acceptor-credentials
Open

Fix SSPI acceptor credentials#857
elric1 wants to merge 1 commit into
PowerShell:latestw_allfrom
chapeltech:sspi-acceptor-credentials

Conversation

@elric1

@elric1 elric1 commented Jun 22, 2026

Copy link
Copy Markdown

PR Summary

Fix the Windows SSPI shim when GSSAPIStrictAcceptorCheck is disabled.

PR Context

In that mode sshd passes GSS_C_NO_CREDENTIAL to gss_accept_sec_context(), which should mean "use the default acceptor credential"; the shim instead dereferenced it as a real credential handle.

Copilot AI review requested due to automatic review settings June 22, 2026 17:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the Windows SSPI GSSAPI shim’s handling of GSS_C_NO_CREDENTIAL in gss_accept_sec_context() so that, when GSSAPIStrictAcceptorCheck is disabled, the server can accept contexts using the default inbound acceptor credentials instead of dereferencing a null credential handle.

Changes:

  • Detect acceptor_cred_handle == GSS_C_NO_CREDENTIAL and obtain a default inbound SSPI credential handle.
  • Use the selected credential handle (default vs supplied) when calling AcceptSecurityContext().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread contrib/win32/win32compat/gss-sspi.c
@elric1

elric1 commented Jun 22, 2026

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="The Old Chapel Technology, Ltd"

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.

2 participants