diff options
author | Jay Freeman (saurik) | 2016-07-27 02:46:27 -0700 |
---|---|---|
committer | Jay Freeman (saurik) | 2016-07-27 02:46:27 -0700 |
commit | a94c5c827a786844b56e8e36ddaed6239f32d86c (patch) | |
tree | 12caaf642bb2de68986a71bc2eaf152dfce867da | |
parent | 13bf235cac2201747de11652cf14fe2714ca0718 (diff) | |
download | libimobiledevice-a94c5c827a786844b56e8e36ddaed6239f32d86c.tar.gz libimobiledevice-a94c5c827a786844b56e8e36ddaed6239f32d86c.tar.bz2 |
lockdown: remove unnecessary check for pair record file during pairing
During device pairing the code in lockdownd_do_pair() is checking if there
is a pair record on disk for the current device, and then requests it from
usbmuxd. This additional check is not only unnecessary since usbmuxd can
obviously only return a pair record if it exists, but is also causing issues
on newer versions of macOS where /var/db/lockdown is mode 700.
-rw-r--r-- | src/lockdown.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/lockdown.c b/src/lockdown.c index d2e8c74..904267e 100644 --- a/src/lockdown.c +++ b/src/lockdown.c @@ -893,13 +893,9 @@ static lockdownd_error_t lockdownd_do_pair(lockdownd_client_t client, lockdownd_ lockdownd_get_value(client, NULL, "WiFiAddress", &wifi_node); } else { /* use existing pair record */ - if (userpref_has_pair_record(client->udid)) { - userpref_read_pair_record(client->udid, &pair_record_plist); - if (!pair_record_plist) { - return LOCKDOWN_E_INVALID_CONF; - } - } else { - return LOCKDOWN_E_INVALID_HOST_ID; + userpref_read_pair_record(client->udid, &pair_record_plist); + if (!pair_record_plist) { + return LOCKDOWN_E_INVALID_CONF; } } } |