|
@@ -5,7 +5,6 @@ import (
|
|
"os"
|
|
"os"
|
|
"unsafe"
|
|
"unsafe"
|
|
|
|
|
|
- winio "github.com/Microsoft/go-winio"
|
|
|
|
"github.com/docker/docker/pkg/signal"
|
|
"github.com/docker/docker/pkg/signal"
|
|
"github.com/sirupsen/logrus"
|
|
"github.com/sirupsen/logrus"
|
|
"golang.org/x/sys/windows"
|
|
"golang.org/x/sys/windows"
|
|
@@ -17,7 +16,7 @@ func (d *Daemon) setupDumpStackTrap(root string) {
|
|
// signaled. ACL'd to builtin administrators and local system
|
|
// signaled. ACL'd to builtin administrators and local system
|
|
event := "Global\\stackdump-" + fmt.Sprint(os.Getpid())
|
|
event := "Global\\stackdump-" + fmt.Sprint(os.Getpid())
|
|
ev, _ := windows.UTF16PtrFromString(event)
|
|
ev, _ := windows.UTF16PtrFromString(event)
|
|
- sd, err := winio.SddlToSecurityDescriptor("D:P(A;;GA;;;BA)(A;;GA;;;SY)")
|
|
|
|
|
|
+ sd, err := windows.SecurityDescriptorFromString("D:P(A;;GA;;;BA)(A;;GA;;;SY)")
|
|
if err != nil {
|
|
if err != nil {
|
|
logrus.Errorf("failed to get security descriptor for debug stackdump event %s: %s", event, err.Error())
|
|
logrus.Errorf("failed to get security descriptor for debug stackdump event %s: %s", event, err.Error())
|
|
return
|
|
return
|
|
@@ -25,7 +24,7 @@ func (d *Daemon) setupDumpStackTrap(root string) {
|
|
var sa windows.SecurityAttributes
|
|
var sa windows.SecurityAttributes
|
|
sa.Length = uint32(unsafe.Sizeof(sa))
|
|
sa.Length = uint32(unsafe.Sizeof(sa))
|
|
sa.InheritHandle = 1
|
|
sa.InheritHandle = 1
|
|
- sa.SecurityDescriptor = uintptr(unsafe.Pointer(&sd[0]))
|
|
|
|
|
|
+ sa.SecurityDescriptor = sd
|
|
h, err := windows.CreateEvent(&sa, 0, 0, ev)
|
|
h, err := windows.CreateEvent(&sa, 0, 0, ev)
|
|
if h == 0 || err != nil {
|
|
if h == 0 || err != nil {
|
|
logrus.Errorf("failed to create debug stackdump event %s: %s", event, err.Error())
|
|
logrus.Errorf("failed to create debug stackdump event %s: %s", event, err.Error())
|