diff options
| author | David Lönnhager <david.l@mullvad.net> | 2020-11-10 13:43:10 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2020-11-19 01:35:21 +0100 |
| commit | 461dd7f6fd4909e598dfd190f846d1fcc68d6f6b (patch) | |
| tree | 3f56fda7fb64bf0ddfbc55007619697e3796a269 /windows/nsis-plugins/src/cleanup/cleaningops.cpp | |
| parent | 557484f7c7160fcbdf75c4f989c2108110245d79 (diff) | |
| download | mullvadvpn-461dd7f6fd4909e598dfd190f846d1fcc68d6f6b.tar.xz mullvadvpn-461dd7f6fd4909e598dfd190f846d1fcc68d6f6b.zip | |
Bundle API address cache with the app
Diffstat (limited to 'windows/nsis-plugins/src/cleanup/cleaningops.cpp')
| -rw-r--r-- | windows/nsis-plugins/src/cleanup/cleaningops.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/windows/nsis-plugins/src/cleanup/cleaningops.cpp b/windows/nsis-plugins/src/cleanup/cleaningops.cpp index 8653bb50a9..475c78d8b7 100644 --- a/windows/nsis-plugins/src/cleanup/cleaningops.cpp +++ b/windows/nsis-plugins/src/cleanup/cleaningops.cpp @@ -331,4 +331,18 @@ void RemoveRelayCacheServiceUser() std::filesystem::remove(cacheFile); } +void RemoveApiAddressCacheServiceUser() +{ + const auto localAppData = GetSystemUserLocalAppData(); + const auto mullvadAppData = std::filesystem::path(localAppData).append(L"Mullvad VPN"); + + common::fs::ScopedNativeFileSystem nativeFileSystem; + + common::security::AddAdminToObjectDacl(mullvadAppData, SE_FILE_OBJECT); + + const auto cacheFile = std::filesystem::path(mullvadAppData).append(L"api-ip-address.txt"); + + std::filesystem::remove(cacheFile); +} + } |
