We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I create a named pipe from an elevated service that allows writing from a user space program?
The examples work fine if both ends are running as a user. But I need a user-space program to talk to a service running as the system account.
How do i set the permissions on the pipe?
The text was updated successfully, but these errors were encountered:
I think I figured it out using github.com/hectane/go-acl
github.com/hectane/go-acl
import "github.com/hectane/go-acl" func server() error { server, err := npipe.Listen(pipeName) if err != nil { return fmt.Errorf("error creating pipe listener: %w", err) } defer server.Close() err = acl.Apply(pipeName, true, false, acl.GrantName(windows.GENERIC_READ|windows.GENERIC_WRITE, "EVERYONE")) if err != nil { return fmt.Errorf("cannot set permissions on pipe: %w", err) } myService := new(MyService) rpc.Register(myService) fmt.Println("Named pipe server is waiting for connections...") for { conn, err := server.Accept() if err != nil { return fmt.Errorf("error accepting connection: %w", err) } go rpc.ServeConn(conn) } }
Sorry, something went wrong.
No branches or pull requests
How do I create a named pipe from an elevated service that allows writing from a user space program?
The examples work fine if both ends are running as a user. But I need a user-space program to talk to a service running as the system account.
How do i set the permissions on the pipe?
The text was updated successfully, but these errors were encountered: