Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
syscall, os/exec: Support running child process as different user on Windows #35653
What version of Go are you using (
On Windows, syscall.SysProcAttr is this: https://golang.org/pkg/syscall/?GOOS=windows#SysProcAttr
I think you can load the appropriate DLL for LogonUser (see https://godoc.org/golang.org/x/sys/windows#NewLazyDLL), call the function, which grants a syscall.Token, then use it with SysProcAttr.