mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-18 10:57:35 -06:00
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.21.2 to 2.21.3. - [Release notes](https://github.com/tdewolff/minify/releases) - [Commits](https://github.com/tdewolff/minify/compare/v2.21.2...v2.21.3) --- updated-dependencies: - dependency-name: github.com/tdewolff/minify/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
41 lines
962 B
Go
41 lines
962 B
Go
//go:build windows
|
|
|
|
package internal
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"golang.org/x/sys/windows"
|
|
)
|
|
|
|
// Just a dummy.
|
|
var (
|
|
SyscallEACCES = errors.New("dummy")
|
|
UnixEACCES = errors.New("dummy")
|
|
)
|
|
|
|
func SetRlimit() {}
|
|
func Maxfiles() uint64 { return 1<<64 - 1 }
|
|
func Mkfifo(path string, mode uint32) error { return errors.New("no FIFOs on Windows") }
|
|
func Mknod(path string, mode uint32, dev int) error { return errors.New("no device nodes on Windows") }
|
|
|
|
func HasPrivilegesForSymlink() bool {
|
|
var sid *windows.SID
|
|
err := windows.AllocateAndInitializeSid(
|
|
&windows.SECURITY_NT_AUTHORITY,
|
|
2,
|
|
windows.SECURITY_BUILTIN_DOMAIN_RID,
|
|
windows.DOMAIN_ALIAS_RID_ADMINS,
|
|
0, 0, 0, 0, 0, 0,
|
|
&sid)
|
|
if err != nil {
|
|
return false
|
|
}
|
|
defer windows.FreeSid(sid)
|
|
token := windows.Token(0)
|
|
member, err := token.IsMember(sid)
|
|
if err != nil {
|
|
return false
|
|
}
|
|
return member || token.IsElevated()
|
|
}
|