diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-06-25 16:15:44 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-06-25 19:53:46 +0200 |
| commit | 8ceddc8ee08e6f93650e4125510e31ab9f9e4dc7 (patch) | |
| tree | 74f81c842087f188a64f057066a5cd0a912c4e29 | |
| parent | 4a5bb89558675c22c50df64f40efc26863645033 (diff) | |
| download | mullvadvpn-8ceddc8ee08e6f93650e4125510e31ab9f9e4dc7.tar.xz mullvadvpn-8ceddc8ee08e6f93650e4125510e31ab9f9e4dc7.zip | |
Add dependencies
| -rw-r--r-- | Cargo.lock | 6 | ||||
| -rw-r--r-- | mullvad-daemon/Cargo.toml | 2 | ||||
| -rw-r--r-- | mullvad-daemon/src/system_service.rs | 10 |
3 files changed, 12 insertions, 6 deletions
diff --git a/Cargo.lock b/Cargo.lock index d6c7f038ae..0509c70917 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -791,7 +791,7 @@ dependencies = [ "tokio-timer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "windows-service 0.1.0 (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)", ] [[package]] @@ -1840,7 +1840,7 @@ dependencies = [ [[package]] name = "windows-service" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" +source = "git+https://github.com/mullvad/windows-service-rs.git?rev=55c5dfb372e6b3f5607a3159c5388d27b6b84ff6#55c5dfb372e6b3f5607a3159c5388d27b6b84ff6" dependencies = [ "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2073,7 +2073,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "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 (registry+https://github.com/rust-lang/crates.io-index)" = "51cb08429e18f787748343122610b09f50c79f8034627e57faacf37582a709ec" +"checksum windows-service 0.1.0 (git+https://github.com/mullvad/windows-service-rs.git?rev=55c5dfb372e6b3f5607a3159c5388d27b6b84ff6)" = "<none>" "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/Cargo.toml b/mullvad-daemon/Cargo.toml index ed23fe0ad0..f985440a99 100644 --- a/mullvad-daemon/Cargo.toml +++ b/mullvad-daemon/Cargo.toml @@ -40,5 +40,5 @@ simple-signal = "1.1" [target.'cfg(windows)'.dependencies] ctrlc = "3.0" -windows-service = "0.1" +windows-service = { git = "https://github.com/mullvad/windows-service-rs.git", rev = "55c5dfb372e6b3f5607a3159c5388d27b6b84ff6" } winapi = "0.3" diff --git a/mullvad-daemon/src/system_service.rs b/mullvad-daemon/src/system_service.rs index 649aa566fe..3de37a2f7b 100644 --- a/mullvad-daemon/src/system_service.rs +++ b/mullvad-daemon/src/system_service.rs @@ -9,8 +9,8 @@ use std::{env, io, thread}; use cli; use error_chain::ChainedError; use windows_service::service::{ - ServiceAccess, ServiceControl, ServiceControlAccept, ServiceErrorControl, ServiceExitCode, - ServiceInfo, ServiceStartType, ServiceState, ServiceStatus, ServiceType, + ServiceAccess, ServiceControl, ServiceControlAccept, ServiceDependency, ServiceErrorControl, + ServiceExitCode, ServiceInfo, ServiceStartType, ServiceState, ServiceStatus, ServiceType, }; use windows_service::service_control_handler::{ self, ServiceControlHandlerResult, ServiceStatusHandle, @@ -226,6 +226,12 @@ fn get_service_info() -> Result<ServiceInfo> { error_control: ServiceErrorControl::Normal, executable_path: env::current_exe().unwrap(), launch_arguments: vec![OsString::from("--run-as-service"), OsString::from("-v")], + dependencies: vec![ + // Base Filter Engine + ServiceDependency::Service(OsString::from("BFE")), + // Windows Management Instrumentation (WMI) + ServiceDependency::Service(OsString::from("winmgmt")), + ], account_name: None, // run as System account_password: None, }) |
