macOS: Better handling of tunnels created by another user

Previously, the tunnels just got deleted.

Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
Roopesh Chander committed 2019-04-03 19:04:12 +05:30
1 parent 0299c3929e
commit 9690365dd4
6 files changed
+115 -9

No files matched your search

@@ -49,9 +49,9 @@ extension NETunnelProviderProtocol {
Keychain.deleteReference(called: ref)
}
func verifyConfigurationReference() -> Data? {
guard let ref = passwordReference else { return nil }
return Keychain.verifyReference(called: ref) ? ref : nil
func verifyConfigurationReference() -> Bool {
guard let ref = passwordReference else { return false }
return Keychain.verifyReference(called: ref)
}
@discardableResult