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

sd.go: fix calculation of security descriptor length in SddlToSecurit… #299

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

dblohm7
Copy link
Contributor

@dblohm7 dblohm7 commented Aug 9, 2023

…yDescriptor

unsafe.Sizeof(windows.SECURITY_DESCRIPTOR{}) is the minimum length of the SD, not the actual length. Use the actual length for computing the length of the slice.

This path also removes getSecurityDescriptorLength, which is no longer used.

Copy link
Contributor

@helsaawy helsaawy left a comment

Choose a reason for hiding this comment

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

Linter is failing for an unrelated reason (but that was just fixed: #300), if you can rebase

@dblohm7
Copy link
Contributor Author

dblohm7 commented Aug 9, 2023

@microsoft-github-policy-service agree company="Tailscale Inc."

…yDescriptor

unsafe.Sizeof(windows.SECURITY_DESCRIPTOR{}) is the minimum length of the SD,
not the actual length. Use the actual length for computing the length of the
slice.

This path also removes getSecurityDescriptorLength, which is no longer used.

Fixes microsoft#298

Signed-off-by: Aaron Klotz <aaron@tailscale.com>
@helsaawy helsaawy merged commit eb5b095 into microsoft:main Aug 10, 2023
8 checks passed
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