Minor touchups
This commit is contained in:
parent
42ed31b127
commit
ab519c54dc
10 changed files with 15 additions and 14 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue