3ec5be3f51
This file was never truly necessary and has never actually been used in the history of Tailscale's open source releases. A Brief History of AUTHORS files --- The AUTHORS file was a pattern developed at Google, originally for Chromium, then adopted by Go and a bunch of other projects. The problem was that Chromium originally had a copyright line only recognizing Google as the copyright holder. Because Google (and most open source projects) do not require copyright assignemnt for contributions, each contributor maintains their copyright. Some large corporate contributors then tried to add their own name to the copyright line in the LICENSE file or in file headers. This quickly becomes unwieldy, and puts a tremendous burden on anyone building on top of Chromium, since the license requires that they keep all copyright lines intact. The compromise was to create an AUTHORS file that would list all of the copyright holders. The LICENSE file and source file headers would then include that list by reference, listing the copyright holder as "The Chromium Authors". This also become cumbersome to simply keep the file up to date with a high rate of new contributors. Plus it's not always obvious who the copyright holder is. Sometimes it is the individual making the contribution, but many times it may be their employer. There is no way for the proejct maintainer to know. Eventually, Google changed their policy to no longer recommend trying to keep the AUTHORS file up to date proactively, and instead to only add to it when requested: https://opensource.google/docs/releasing/authors. They are also clear that: > Adding contributors to the AUTHORS file is entirely within the > project's discretion and has no implications for copyright ownership. It was primarily added to appease a small number of large contributors that insisted that they be recognized as copyright holders (which was entirely their right to do). But it's not truly necessary, and not even the most accurate way of identifying contributors and/or copyright holders. In practice, we've never added anyone to our AUTHORS file. It only lists Tailscale, so it's not really serving any purpose. It also causes confusion because Tailscalars put the "Tailscale Inc & AUTHORS" header in other open source repos which don't actually have an AUTHORS file, so it's ambiguous what that means. Instead, we just acknowledge that the contributors to Tailscale (whoever they are) are copyright holders for their individual contributions. We also have the benefit of using the DCO (developercertificate.org) which provides some additional certification of their right to make the contribution. The source file changes were purely mechanical with: git ls-files | xargs sed -i -e 's/\(Tailscale Inc &\) AUTHORS/\1 contributors/g' Updates #cleanup Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d Signed-off-by: Will Norris <will@tailscale.com>
315 lines
8.2 KiB
Go
315 lines
8.2 KiB
Go
// Copyright (c) Tailscale Inc & contributors
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
// Code generated by 'go generate'; DO NOT EDIT.
|
|
|
|
// Package wsc provides access to the Windows Security Center API.
|
|
package wsc
|
|
|
|
import (
|
|
"runtime"
|
|
"syscall"
|
|
"unsafe"
|
|
|
|
"github.com/dblohm7/wingoes"
|
|
"github.com/dblohm7/wingoes/com"
|
|
"github.com/dblohm7/wingoes/com/automation"
|
|
)
|
|
|
|
var (
|
|
CLSID_WSCProductList = &com.CLSID{0x17072F7B, 0x9ABE, 0x4A74, [8]byte{0xA2, 0x61, 0x1E, 0xB7, 0x6B, 0x55, 0x10, 0x7A}}
|
|
)
|
|
|
|
var (
|
|
IID_IWSCProductList = &com.IID{0x722A338C, 0x6E8E, 0x4E72, [8]byte{0xAC, 0x27, 0x14, 0x17, 0xFB, 0x0C, 0x81, 0xC2}}
|
|
IID_IWscProduct = &com.IID{0x8C38232E, 0x3A45, 0x4A27, [8]byte{0x92, 0xB0, 0x1A, 0x16, 0xA9, 0x75, 0xF6, 0x69}}
|
|
)
|
|
|
|
type WSC_SECURITY_PRODUCT_STATE int32
|
|
|
|
const (
|
|
WSC_SECURITY_PRODUCT_STATE_ON = WSC_SECURITY_PRODUCT_STATE(0)
|
|
WSC_SECURITY_PRODUCT_STATE_OFF = WSC_SECURITY_PRODUCT_STATE(1)
|
|
WSC_SECURITY_PRODUCT_STATE_SNOOZED = WSC_SECURITY_PRODUCT_STATE(2)
|
|
WSC_SECURITY_PRODUCT_STATE_EXPIRED = WSC_SECURITY_PRODUCT_STATE(3)
|
|
)
|
|
|
|
type WSC_SECURITY_SIGNATURE_STATUS int32
|
|
|
|
const (
|
|
WSC_SECURITY_PRODUCT_OUT_OF_DATE = WSC_SECURITY_SIGNATURE_STATUS(0)
|
|
WSC_SECURITY_PRODUCT_UP_TO_DATE = WSC_SECURITY_SIGNATURE_STATUS(1)
|
|
)
|
|
|
|
type WSC_SECURITY_PROVIDER int32
|
|
|
|
const (
|
|
WSC_SECURITY_PROVIDER_FIREWALL = WSC_SECURITY_PROVIDER(1)
|
|
WSC_SECURITY_PROVIDER_AUTOUPDATE_SETTINGS = WSC_SECURITY_PROVIDER(2)
|
|
WSC_SECURITY_PROVIDER_ANTIVIRUS = WSC_SECURITY_PROVIDER(4)
|
|
WSC_SECURITY_PROVIDER_ANTISPYWARE = WSC_SECURITY_PROVIDER(8)
|
|
WSC_SECURITY_PROVIDER_INTERNET_SETTINGS = WSC_SECURITY_PROVIDER(16)
|
|
WSC_SECURITY_PROVIDER_USER_ACCOUNT_CONTROL = WSC_SECURITY_PROVIDER(32)
|
|
WSC_SECURITY_PROVIDER_SERVICE = WSC_SECURITY_PROVIDER(64)
|
|
WSC_SECURITY_PROVIDER_NONE = WSC_SECURITY_PROVIDER(0)
|
|
WSC_SECURITY_PROVIDER_ALL = WSC_SECURITY_PROVIDER(127)
|
|
)
|
|
|
|
type SECURITY_PRODUCT_TYPE int32
|
|
|
|
const (
|
|
SECURITY_PRODUCT_TYPE_ANTIVIRUS = SECURITY_PRODUCT_TYPE(0)
|
|
SECURITY_PRODUCT_TYPE_FIREWALL = SECURITY_PRODUCT_TYPE(1)
|
|
SECURITY_PRODUCT_TYPE_ANTISPYWARE = SECURITY_PRODUCT_TYPE(2)
|
|
)
|
|
|
|
type IWscProductABI struct {
|
|
com.IUnknownABI // Technically IDispatch, but we're bypassing all of that atm
|
|
}
|
|
|
|
func (abi *IWscProductABI) GetProductName() (pVal string, err error) {
|
|
var t0 automation.BSTR
|
|
|
|
method := unsafe.Slice(abi.Vtbl, 14)[7]
|
|
hr, _, _ := syscall.SyscallN(method, uintptr(unsafe.Pointer(abi)), uintptr(unsafe.Pointer(&t0)))
|
|
if e := wingoes.ErrorFromHRESULT(wingoes.HRESULT(hr)); !e.IsOK() {
|
|
err = e
|
|
if e.Failed() {
|
|
return
|
|
}
|
|
}
|
|
|
|
pVal = t0.String()
|
|
t0.Close()
|
|
return
|
|
}
|
|
|
|
func (abi *IWscProductABI) GetProductState() (val WSC_SECURITY_PRODUCT_STATE, err error) {
|
|
method := unsafe.Slice(abi.Vtbl, 14)[8]
|
|
hr, _, _ := syscall.SyscallN(method, uintptr(unsafe.Pointer(abi)), uintptr(unsafe.Pointer(&val)))
|
|
if e := wingoes.ErrorFromHRESULT(wingoes.HRESULT(hr)); !e.IsOK() {
|
|
err = e
|
|
}
|
|
return
|
|
}
|
|
|
|
func (abi *IWscProductABI) GetSignatureStatus() (val WSC_SECURITY_SIGNATURE_STATUS, err error) {
|
|
method := unsafe.Slice(abi.Vtbl, 14)[9]
|
|
hr, _, _ := syscall.SyscallN(method, uintptr(unsafe.Pointer(abi)), uintptr(unsafe.Pointer(&val)))
|
|
if e := wingoes.ErrorFromHRESULT(wingoes.HRESULT(hr)); !e.IsOK() {
|
|
err = e
|
|
}
|
|
return
|
|
}
|
|
|
|
func (abi *IWscProductABI) GetRemediationPath() (pVal string, err error) {
|
|
var t0 automation.BSTR
|
|
|
|
method := unsafe.Slice(abi.Vtbl, 14)[10]
|
|
hr, _, _ := syscall.SyscallN(method, uintptr(unsafe.Pointer(abi)), uintptr(unsafe.Pointer(&t0)))
|
|
if e := wingoes.ErrorFromHRESULT(wingoes.HRESULT(hr)); !e.IsOK() {
|
|
err = e
|
|
if e.Failed() {
|
|
return
|
|
}
|
|
}
|
|
|
|
pVal = t0.String()
|
|
t0.Close()
|
|
return
|
|
}
|
|
|
|
func (abi *IWscProductABI) GetProductStateTimestamp() (pVal string, err error) {
|
|
var t0 automation.BSTR
|
|
|
|
method := unsafe.Slice(abi.Vtbl, 14)[11]
|
|
hr, _, _ := syscall.SyscallN(method, uintptr(unsafe.Pointer(abi)), uintptr(unsafe.Pointer(&t0)))
|
|
if e := wingoes.ErrorFromHRESULT(wingoes.HRESULT(hr)); !e.IsOK() {
|
|
err = e
|
|
if e.Failed() {
|
|
return
|
|
}
|
|
}
|
|
|
|
pVal = t0.String()
|
|
t0.Close()
|
|
return
|
|
}
|
|
|
|
func (abi *IWscProductABI) GetProductGuid() (pVal string, err error) {
|
|
var t0 automation.BSTR
|
|
|
|
method := unsafe.Slice(abi.Vtbl, 14)[12]
|
|
hr, _, _ := syscall.SyscallN(method, uintptr(unsafe.Pointer(abi)), uintptr(unsafe.Pointer(&t0)))
|
|
if e := wingoes.ErrorFromHRESULT(wingoes.HRESULT(hr)); !e.IsOK() {
|
|
err = e
|
|
if e.Failed() {
|
|
return
|
|
}
|
|
}
|
|
|
|
pVal = t0.String()
|
|
t0.Close()
|
|
return
|
|
}
|
|
|
|
func (abi *IWscProductABI) GetProductIsDefault() (pVal bool, err error) {
|
|
var t0 int32
|
|
|
|
method := unsafe.Slice(abi.Vtbl, 14)[13]
|
|
hr, _, _ := syscall.SyscallN(method, uintptr(unsafe.Pointer(abi)), uintptr(unsafe.Pointer(&t0)))
|
|
if e := wingoes.ErrorFromHRESULT(wingoes.HRESULT(hr)); !e.IsOK() {
|
|
err = e
|
|
if e.Failed() {
|
|
return
|
|
}
|
|
}
|
|
|
|
pVal = t0 != 0
|
|
return
|
|
}
|
|
|
|
type WscProduct struct {
|
|
com.GenericObject[IWscProductABI]
|
|
}
|
|
|
|
func (o WscProduct) GetProductName() (pVal string, err error) {
|
|
p := *(o.Pp)
|
|
return p.GetProductName()
|
|
}
|
|
|
|
func (o WscProduct) GetProductState() (val WSC_SECURITY_PRODUCT_STATE, err error) {
|
|
p := *(o.Pp)
|
|
return p.GetProductState()
|
|
}
|
|
|
|
func (o WscProduct) GetSignatureStatus() (val WSC_SECURITY_SIGNATURE_STATUS, err error) {
|
|
p := *(o.Pp)
|
|
return p.GetSignatureStatus()
|
|
}
|
|
|
|
func (o WscProduct) GetRemediationPath() (pVal string, err error) {
|
|
p := *(o.Pp)
|
|
return p.GetRemediationPath()
|
|
}
|
|
|
|
func (o WscProduct) GetProductStateTimestamp() (pVal string, err error) {
|
|
p := *(o.Pp)
|
|
return p.GetProductStateTimestamp()
|
|
}
|
|
|
|
func (o WscProduct) GetProductGuid() (pVal string, err error) {
|
|
p := *(o.Pp)
|
|
return p.GetProductGuid()
|
|
}
|
|
|
|
func (o WscProduct) GetProductIsDefault() (pVal bool, err error) {
|
|
p := *(o.Pp)
|
|
return p.GetProductIsDefault()
|
|
}
|
|
|
|
func (o WscProduct) IID() *com.IID {
|
|
return IID_IWscProduct
|
|
}
|
|
|
|
func (o WscProduct) Make(r com.ABIReceiver) any {
|
|
if r == nil {
|
|
return WscProduct{}
|
|
}
|
|
|
|
runtime.SetFinalizer(r, com.ReleaseABI)
|
|
|
|
pp := (**IWscProductABI)(unsafe.Pointer(r))
|
|
return WscProduct{com.GenericObject[IWscProductABI]{Pp: pp}}
|
|
}
|
|
|
|
func (o WscProduct) MakeFromKnownABI(r **IWscProductABI) WscProduct {
|
|
if r == nil {
|
|
return WscProduct{}
|
|
}
|
|
|
|
runtime.SetFinalizer(r, func(r **IWscProductABI) { (*r).Release() })
|
|
return WscProduct{com.GenericObject[IWscProductABI]{Pp: r}}
|
|
}
|
|
|
|
func (o WscProduct) UnsafeUnwrap() *IWscProductABI {
|
|
return *(o.Pp)
|
|
}
|
|
|
|
type IWSCProductListABI struct {
|
|
com.IUnknownABI // Technically IDispatch, but we're bypassing all of that atm
|
|
}
|
|
|
|
func (abi *IWSCProductListABI) Initialize(provider WSC_SECURITY_PROVIDER) (err error) {
|
|
method := unsafe.Slice(abi.Vtbl, 10)[7]
|
|
hr, _, _ := syscall.SyscallN(method, uintptr(unsafe.Pointer(abi)), uintptr(provider))
|
|
if e := wingoes.ErrorFromHRESULT(wingoes.HRESULT(hr)); !e.IsOK() {
|
|
err = e
|
|
}
|
|
return
|
|
}
|
|
|
|
func (abi *IWSCProductListABI) GetCount() (val int32, err error) {
|
|
method := unsafe.Slice(abi.Vtbl, 10)[8]
|
|
hr, _, _ := syscall.SyscallN(method, uintptr(unsafe.Pointer(abi)), uintptr(unsafe.Pointer(&val)))
|
|
if e := wingoes.ErrorFromHRESULT(wingoes.HRESULT(hr)); !e.IsOK() {
|
|
err = e
|
|
}
|
|
return
|
|
}
|
|
|
|
func (abi *IWSCProductListABI) GetItem(index uint32) (val WscProduct, err error) {
|
|
var t0 *IWscProductABI
|
|
|
|
method := unsafe.Slice(abi.Vtbl, 10)[9]
|
|
hr, _, _ := syscall.SyscallN(method, uintptr(unsafe.Pointer(abi)), uintptr(index), uintptr(unsafe.Pointer(&t0)))
|
|
if e := wingoes.ErrorFromHRESULT(wingoes.HRESULT(hr)); !e.IsOK() {
|
|
err = e
|
|
if e.Failed() {
|
|
return
|
|
}
|
|
}
|
|
|
|
var r0 WscProduct
|
|
val = r0.MakeFromKnownABI(&t0)
|
|
return
|
|
}
|
|
|
|
type WSCProductList struct {
|
|
com.GenericObject[IWSCProductListABI]
|
|
}
|
|
|
|
func (o WSCProductList) Initialize(provider WSC_SECURITY_PROVIDER) (err error) {
|
|
p := *(o.Pp)
|
|
return p.Initialize(provider)
|
|
}
|
|
|
|
func (o WSCProductList) GetCount() (val int32, err error) {
|
|
p := *(o.Pp)
|
|
return p.GetCount()
|
|
}
|
|
|
|
func (o WSCProductList) GetItem(index uint32) (val WscProduct, err error) {
|
|
p := *(o.Pp)
|
|
return p.GetItem(index)
|
|
}
|
|
|
|
func (o WSCProductList) IID() *com.IID {
|
|
return IID_IWSCProductList
|
|
}
|
|
|
|
func (o WSCProductList) Make(r com.ABIReceiver) any {
|
|
if r == nil {
|
|
return WSCProductList{}
|
|
}
|
|
|
|
runtime.SetFinalizer(r, com.ReleaseABI)
|
|
|
|
pp := (**IWSCProductListABI)(unsafe.Pointer(r))
|
|
return WSCProductList{com.GenericObject[IWSCProductListABI]{Pp: pp}}
|
|
}
|
|
|
|
func (o WSCProductList) UnsafeUnwrap() *IWSCProductListABI {
|
|
return *(o.Pp)
|
|
}
|