diff options
| author | 2016-07-27 02:46:27 -0700 | |
|---|---|---|
| committer | 2016-07-27 02:46:27 -0700 | |
| commit | a94c5c827a786844b56e8e36ddaed6239f32d86c (patch) | |
| tree | 12caaf642bb2de68986a71bc2eaf152dfce867da /src | |
| 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.
Diffstat (limited to 'src')
| -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_ | |||
| 893 | lockdownd_get_value(client, NULL, "WiFiAddress", &wifi_node); | 893 | lockdownd_get_value(client, NULL, "WiFiAddress", &wifi_node); |
| 894 | } else { | 894 | } else { |
| 895 | /* use existing pair record */ | 895 | /* use existing pair record */ |
| 896 | if (userpref_has_pair_record(client->udid)) { | 896 | userpref_read_pair_record(client->udid, &pair_record_plist); |
| 897 | userpref_read_pair_record(client->udid, &pair_record_plist); | 897 | if (!pair_record_plist) { |
| 898 | if (!pair_record_plist) { | 898 | return LOCKDOWN_E_INVALID_CONF; |
| 899 | return LOCKDOWN_E_INVALID_CONF; | ||
| 900 | } | ||
| 901 | } else { | ||
| 902 | return LOCKDOWN_E_INVALID_HOST_ID; | ||
| 903 | } | 899 | } |
| 904 | } | 900 | } |
| 905 | } | 901 | } |
