]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
Keychain: prevent call to stat() when determining appex path
authorAndrej Mihajlov <and@mullvad.net>
Mon, 21 Dec 2020 16:57:18 +0000 (17:57 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Tue, 22 Dec 2020 11:46:14 +0000 (12:46 +0100)
Signed-off-by: Andrej Mihajlov <and@mullvad.net>
Sources/Shared/Keychain.swift

index e301fed11c3cda2910ae28e81722225203fe88d5..c6e7526b3957d192b1a13ccf18051183fe3329d7 100644 (file)
@@ -44,7 +44,7 @@ class Keychain {
         items[kSecAttrSynchronizable] = false
         items[kSecAttrAccessible] = kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly
 
-        guard let extensionPath = Bundle.main.builtInPlugInsURL?.appendingPathComponent("WireGuardNetworkExtension.appex").path else {
+        guard let extensionPath = Bundle.main.builtInPlugInsURL?.appendingPathComponent("WireGuardNetworkExtension.appex", isDirectory: true).path else {
             wg_log(.error, staticMessage: "Unable to determine app extension path")
             return nil
         }