Minor touchups

This commit is contained in:
AlexSSD7 2023-09-01 16:29:01 +01:00
commit ab519c54dc
10 changed files with 15 additions and 14 deletions

View file

@ -76,10 +76,6 @@ func CheckRunAsRoot() (bool, error) {
defer func() { _ = windows.FreeSid(sid) }()
// This appears to cast a null pointer so I'm not sure why this
// works, but this guy says it does and it Works for Me™:
// https://github.com/golang/go/issues/28804#issuecomment-438838144
member, err := windows.Token(0).IsMember(sid)
if err != nil {
return false, errors.Wrap(err, "check win sid membership")