diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2026-06-09 21:09:39 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2026-06-09 21:09:39 +0200 |
| commit | 6903a774ecbbd05596adda5e2b5e18d58dd3a8f9 (patch) | |
| tree | f5d48f52f0da3da8d829436519bc66652bf41c64 /vendor/golang.org/x/sys/windows/security_windows.go | |
| parent | e75d9e371269a4e46bffa6b3dd1fc7d040e82750 (diff) | |
| download | gofu-6903a774ecbbd05596adda5e2b5e18d58dd3a8f9.tar.gz | |
bump all dependencies to their latest versions
Diffstat (limited to 'vendor/golang.org/x/sys/windows/security_windows.go')
| -rw-r--r-- | vendor/golang.org/x/sys/windows/security_windows.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go index a8b0364..6c955ce 100644 --- a/vendor/golang.org/x/sys/windows/security_windows.go +++ b/vendor/golang.org/x/sys/windows/security_windows.go @@ -1438,13 +1438,17 @@ func GetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformati } // GetNamedSecurityInfo queries the security information for a given named object and returns the self-relative security -// descriptor result on the Go heap. +// descriptor result on the Go heap. The security descriptor might be nil, even when err is nil, if the object exists +// but has no security descriptor. func GetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION) (sd *SECURITY_DESCRIPTOR, err error) { var winHeapSD *SECURITY_DESCRIPTOR err = getNamedSecurityInfo(objectName, objectType, securityInformation, nil, nil, nil, nil, &winHeapSD) if err != nil { return } + if winHeapSD == nil { + return nil, nil + } defer LocalFree(Handle(unsafe.Pointer(winHeapSD))) return winHeapSD.copySelfRelativeSecurityDescriptor(), nil } |
