aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/updater/downloader.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-06-06 15:44:29 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-06-07 11:31:53 +0200
commit6f9a7593646c6af0d4f19af2f669ce28b6e30cab (patch)
treedd1e16a34fafff9635381e21e99c65421ed5cbf4 /updater/downloader.go
parenttunnel: perform full stop on shutdown (diff)
downloadwireguard-windows-6f9a7593646c6af0d4f19af2f669ce28b6e30cab.tar.xz
wireguard-windows-6f9a7593646c6af0d4f19af2f669ce28b6e30cab.zip
global: cleanup TODO comment spacing
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'updater/downloader.go')
-rw-r--r--updater/downloader.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/updater/downloader.go b/updater/downloader.go
index f9b70834..a12b5037 100644
--- a/updater/downloader.go
+++ b/updater/downloader.go
@@ -106,7 +106,7 @@ func DownloadVerifyAndExecute(userToken uintptr) (progress chan DownloadProgress
file.Seek(0, io.SeekStart)
file.Truncate(0)
file.Close()
- os.Remove(name) //TODO: Do we have any sort of TOCTOU here?
+ os.Remove(name) // TODO: Do we have any sort of TOCTOU here?
}
}()
@@ -145,7 +145,7 @@ func DownloadVerifyAndExecute(userToken uintptr) (progress chan DownloadProgress
return
}
- //TODO: it would be nice to rename in place from "file.msi.unverified" to "file.msi", but Windows TOCTOU stuff
+ // TODO: it would be nice to rename in place from "file.msi.unverified" to "file.msi", but Windows TOCTOU stuff
// is hard, so we'll come back to this later.
name := file.Name()
file.Close()
@@ -153,14 +153,14 @@ func DownloadVerifyAndExecute(userToken uintptr) (progress chan DownloadProgress
progress <- DownloadProgress{Activity: "Verifying authenticode signature"}
if !version.VerifyAuthenticode(name) {
- os.Remove(name) //TODO: Do we have any sort of TOCTOU here?
+ os.Remove(name) // TODO: Do we have any sort of TOCTOU here?
progress <- DownloadProgress{Error: errors.New("The downloaded update does not have an authentic authenticode signature")}
return
}
progress <- DownloadProgress{Activity: "Installing update"}
err = runMsi(name, userToken)
- os.Remove(name) //TODO: Do we have any sort of TOCTOU here?
+ os.Remove(name) // TODO: Do we have any sort of TOCTOU here?
if err != nil {
progress <- DownloadProgress{Error: err}
return