summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOdd Stranne <odd@mullvad.net>2018-07-13 12:01:47 +0200
committerOdd Stranne <odd@mullvad.net>2018-07-13 12:01:47 +0200
commita6ef193215e73636268a9b6bb0a7477765b5f687 (patch)
treed8dfec9df2d37576e2fa61877d8b20538bb9c611
parentee7ca9b8987baa11efedb5d320204237aee087fb (diff)
parent13c420193229601b0d481d91265702d3b3b9c47c (diff)
downloadmullvadvpn-a6ef193215e73636268a9b6bb0a7477765b5f687.tar.xz
mullvadvpn-a6ef193215e73636268a9b6bb0a7477765b5f687.zip
Merge branch 'add-daemon-manifest'
-rw-r--r--CHANGELOG.md1
-rw-r--r--Cargo.lock19
-rw-r--r--mullvad-daemon/build.rs2
-rw-r--r--mullvad-daemon/mullvad-daemon.manifest24
-rw-r--r--mullvad-daemon/resources.rc8
-rw-r--r--mullvad-daemon/version.rc2
-rw-r--r--mullvad-problem-report/build.rs2
7 files changed, 54 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 91894b7662..17f9f2a9ce 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -32,6 +32,7 @@ Line wrap the file at 100 chars. Th
#### Windows
- Include version information (meta data) in executables and DLLs.
+- Include manifest in daemon so it always runs with administrator privileges.
### Changed
- App now uses statically linked OpenSSL on all platforms.
diff --git a/Cargo.lock b/Cargo.lock
index 0a8a18c01a..1bd24888d5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -166,6 +166,11 @@ dependencies = [
]
[[package]]
+name = "concat-string"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
name = "core-foundation"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -780,6 +785,7 @@ dependencies = [
"serde 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)",
"talpid-ipc 0.1.0",
"talpid-types 0.1.0",
+ "windres 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -816,6 +822,7 @@ dependencies = [
"uuid 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"windows-service 0.1.0 (git+https://github.com/mullvad/windows-service-rs.git?rev=55c5dfb372e6b3f5607a3159c5388d27b6b84ff6)",
+ "windres 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -851,6 +858,7 @@ dependencies = [
"mullvad-rpc 0.1.0",
"regex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "windres 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1470,6 +1478,7 @@ dependencies = [
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"openvpn-plugin 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"talpid-ipc 0.1.0",
+ "windres 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1861,6 +1870,14 @@ dependencies = [
]
[[package]]
+name = "windres"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "concat-string 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "ws"
version = "0.7.5"
source = "git+https://github.com/tomusdrw/ws-rs#f12d19c4c19422fc79af28a3181f598bc07ecd1e"
@@ -1913,6 +1930,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum chrono 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1cce36c92cb605414e9b824f866f5babe0a0368e39ea07393b9b63cf3844c0e6"
"checksum clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0f16b89cbb9ee36d87483dc939fe9f1e13c05898d56d7b230a0d4dff033a536"
"checksum colored 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b0aa3473e85a3161b59845d6096b289bb577874cafeaf75ea1b1beaa6572c7fc"
+"checksum concat-string 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7439becb5fafc780b6f4de382b1a7a3e70234afe783854a4702ee8adbb838609"
"checksum core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "286e0b41c3a20da26536c6000a280585d519fd07b3956b43aed8a79e9edce980"
"checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa"
"checksum crossbeam-deque 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c1bdc73742c36f7f35ebcda81dbb33a7e0d33757d03a06d9ddca762712ec5ea2"
@@ -2086,6 +2104,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
"checksum wincolor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eeb06499a3a4d44302791052df005d5232b927ed1a9658146d842165c4de7767"
"checksum windows-service 0.1.0 (git+https://github.com/mullvad/windows-service-rs.git?rev=55c5dfb372e6b3f5607a3159c5388d27b6b84ff6)" = "<none>"
+"checksum windres 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c437ac5da816407bfb202da316d55f36be0cf9db14146a1ff4e4744a3d7dc565"
"checksum ws 0.7.5 (git+https://github.com/tomusdrw/ws-rs)" = "<none>"
"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
"checksum xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a66b7c2281ebde13cf4391d70d4c7e5946c3c25e72a7b859ca8f677dcd0b0c61"
diff --git a/mullvad-daemon/build.rs b/mullvad-daemon/build.rs
index 246b38d13d..45ce36bdba 100644
--- a/mullvad-daemon/build.rs
+++ b/mullvad-daemon/build.rs
@@ -15,7 +15,7 @@ fn main() {
#[cfg(windows)]
{
- windres::Build::new().compile("version.rc").unwrap();
+ windres::Build::new().compile("resources.rc").unwrap();
}
}
diff --git a/mullvad-daemon/mullvad-daemon.manifest b/mullvad-daemon/mullvad-daemon.manifest
new file mode 100644
index 0000000000..f9e3cce75b
--- /dev/null
+++ b/mullvad-daemon/mullvad-daemon.manifest
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
+<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel
+ level="requireAdministrator"
+ uiAccess="false"/>
+ </requestedPrivileges>
+ </security>
+</trustInfo>
+<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <!--The ID below indicates app support for Windows 7 -->
+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+ <!--The ID below indicates app support for Windows 8 -->
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+ <!--The ID below indicates app support for Windows 8.1 -->
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+ <!--The ID below indicates app support for Windows 10 -->
+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+ </application>
+</compatibility>
+</assembly>
diff --git a/mullvad-daemon/resources.rc b/mullvad-daemon/resources.rc
new file mode 100644
index 0000000000..d55f0136e3
--- /dev/null
+++ b/mullvad-daemon/resources.rc
@@ -0,0 +1,8 @@
+IDI_MAIN ICON "../dist-assets/icon.ico"
+
+#include "version.rc"
+
+#define RT_MANIFEST 24
+#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
+
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "mullvad-daemon.manifest"
diff --git a/mullvad-daemon/version.rc b/mullvad-daemon/version.rc
index 70733c046b..1c7360bbc0 100644
--- a/mullvad-daemon/version.rc
+++ b/mullvad-daemon/version.rc
@@ -1,7 +1,5 @@
#include "../dist-assets/windows/version.h"
-IDI_MAIN ICON "../dist-assets/icon.ico"
-
1 VERSIONINFO
FILEVERSION MAJOR_VERSION,MINOR_VERSION,PATCH_VERSION,0
PRODUCTVERSION MAJOR_VERSION,MINOR_VERSION,PATCH_VERSION,0
diff --git a/mullvad-problem-report/build.rs b/mullvad-problem-report/build.rs
index b07e8bbb1c..246b38d13d 100644
--- a/mullvad-problem-report/build.rs
+++ b/mullvad-problem-report/build.rs
@@ -12,7 +12,7 @@ fn main() {
let product_version = env!("CARGO_PKG_VERSION").replacen(".0", "", 1);
fs::write(out_dir.join("product-version.txt"), product_version).unwrap();
fs::write(out_dir.join("git-commit-date.txt"), commit_date()).unwrap();
-
+
#[cfg(windows)]
{
windres::Build::new().compile("version.rc").unwrap();