aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/service/service_manager.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-04-02 07:33:37 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-04-02 07:33:37 +0200
commitd28cd0100b89ef182c5c7b39ec1b6b90062647b7 (patch)
treeb8f29db3d80017d3d4b0199f1b0cfc312d69dd81 /service/service_manager.go
parentui: remove spacer that was only needed in a container other than ScrollView (diff)
downloadwireguard-windows-d28cd0100b89ef182c5c7b39ec1b6b90062647b7.tar.xz
wireguard-windows-d28cd0100b89ef182c5c7b39ec1b6b90062647b7.zip
ringlogger: give unprivd access via inheritable mapping handle
Diffstat (limited to 'service/service_manager.go')
-rw-r--r--service/service_manager.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/service/service_manager.go b/service/service_manager.go
index 9fffbfe3..3d7449bd 100644
--- a/service/service_manager.go
+++ b/service/service_manager.go
@@ -169,6 +169,11 @@ func (service *managerService) Execute(args []string, r <-chan svc.ChangeRequest
log.Printf("Unable to listen on IPC pipes: %v", err)
return
}
+ theirLogMapping, err := ringlogger.Global.ExportInheritableMappingHandleStr()
+ if err != nil {
+ log.Printf("Unable to export inheritable mapping handle for logging: %v", err)
+ return
+ }
log.Printf("Starting UI process for user: '%s@%s'", username, domain)
attr := &os.ProcAttr{
@@ -177,7 +182,7 @@ func (service *managerService) Execute(args []string, r <-chan svc.ChangeRequest
},
Files: []*os.File{devNull, devNull, devNull},
}
- proc, err := os.StartProcess(path, []string{path, "/ui", theirReaderStr, theirWriterStr, theirEventStr}, attr)
+ proc, err := os.StartProcess(path, []string{path, "/ui", theirReaderStr, theirWriterStr, theirEventStr, theirLogMapping}, attr)
theirReader.Close()
theirWriter.Close()
theirEvents.Close()