2 Commits
Author SHA1 Message Date
Aaron Klotz 1963303610 pipe.go: add DialPipeAccessImpLevel
I would like to use impersonation on the server side of the pipe, but I
currently cannot because all pipes are connected using the anonymous
impersonation level.

This patch adds a new function that provides the ability to explicitly
specify the desired impersonation level.

Fixes #297

Signed-off-by: Aaron Klotz <aaron@tailscale.com>
2023-09-28 15:49:51 -06:00
Aaron Klotz eb5b095417 sd.go: fix calculation of security descriptor length in SddlToSecurityDescriptor (#299)
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 https://github.com/microsoft/go-winio/issues/298

Signed-off-by: Aaron Klotz <aaron@tailscale.com>
2023-08-10 14:09:46 -04:00