diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-04-02 07:33:37 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-04-02 07:33:37 +0200 |
commit | cee277ca104701300c506fd5f689b6817481c72a (patch) | |
tree | b8f29db3d80017d3d4b0199f1b0cfc312d69dd81 /service/service_manager.go | |
parent | ui: remove spacer that was only needed in a container other than ScrollView (diff) | |
download | wireguard-windows-cee277ca104701300c506fd5f689b6817481c72a.tar.xz wireguard-windows-cee277ca104701300c506fd5f689b6817481c72a.zip |
ringlogger: give unprivd access via inheritable mapping handle
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r-- | service/service_manager.go | 7 |
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() |