summaryrefslogtreecommitdiffstats
path: root/src/lockdown.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lockdown.c')
-rw-r--r--src/lockdown.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lockdown.c b/src/lockdown.c
index 2dd20a4..68a74b5 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -236,8 +236,8 @@ lockdownd_error_t lockdownd_client_free(lockdownd_client_t client)
236 } 236 }
237 } 237 }
238 238
239 if (client->uuid) { 239 if (client->udid) {
240 free(client->uuid); 240 free(client->udid);
241 } 241 }
242 if (client->label) { 242 if (client->label) {
243 free(client->label); 243 free(client->label);
@@ -549,12 +549,12 @@ lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, const char *
549 * Returns the unique id of the device from lockdownd. 549 * Returns the unique id of the device from lockdownd.
550 * 550 *
551 * @param client An initialized lockdownd client. 551 * @param client An initialized lockdownd client.
552 * @param uuid Holds the unique id of the device. The caller is responsible 552 * @param udid Holds the unique id of the device. The caller is responsible
553 * for freeing the memory. 553 * for freeing the memory.
554 * 554 *
555 * @return LOCKDOWN_E_SUCCESS on success 555 * @return LOCKDOWN_E_SUCCESS on success
556 */ 556 */
557lockdownd_error_t lockdownd_get_device_uuid(lockdownd_client_t client, char **uuid) 557lockdownd_error_t lockdownd_get_device_udid(lockdownd_client_t client, char **udid)
558{ 558{
559 lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR; 559 lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR;
560 plist_t value = NULL; 560 plist_t value = NULL;
@@ -563,7 +563,7 @@ lockdownd_error_t lockdownd_get_device_uuid(lockdownd_client_t client, char **uu
563 if (ret != LOCKDOWN_E_SUCCESS) { 563 if (ret != LOCKDOWN_E_SUCCESS) {
564 return ret; 564 return ret;
565 } 565 }
566 plist_get_string_val(value, uuid); 566 plist_get_string_val(value, udid);
567 567
568 plist_free(value); 568 plist_free(value);
569 value = NULL; 569 value = NULL;
@@ -648,7 +648,7 @@ lockdownd_error_t lockdownd_client_new(idevice_t device, lockdownd_client_t *cli
648 648
649 property_list_service_client_t plistclient = NULL; 649 property_list_service_client_t plistclient = NULL;
650 if (property_list_service_client_new(device, 0xf27e, &plistclient) != PROPERTY_LIST_SERVICE_E_SUCCESS) { 650 if (property_list_service_client_new(device, 0xf27e, &plistclient) != PROPERTY_LIST_SERVICE_E_SUCCESS) {
651 debug_info("could not connect to lockdownd (device %s)", device->uuid); 651 debug_info("could not connect to lockdownd (device %s)", device->udid);
652 return LOCKDOWN_E_MUX_ERROR; 652 return LOCKDOWN_E_MUX_ERROR;
653 } 653 }
654 654
@@ -657,10 +657,10 @@ lockdownd_error_t lockdownd_client_new(idevice_t device, lockdownd_client_t *cli
657 client_loc->ssl_enabled = 0; 657 client_loc->ssl_enabled = 0;
658 client_loc->session_id = NULL; 658 client_loc->session_id = NULL;
659 659
660 if (idevice_get_uuid(device, &client_loc->uuid) != IDEVICE_E_SUCCESS) { 660 if (idevice_get_udid(device, &client_loc->udid) != IDEVICE_E_SUCCESS) {
661 debug_info("failed to get device uuid."); 661 debug_info("failed to get device udid.");
662 } 662 }
663 debug_info("device uuid: %s", client_loc->uuid); 663 debug_info("device udid: %s", client_loc->udid);
664 664
665 client_loc->label = label ? strdup(label) : NULL; 665 client_loc->label = label ? strdup(label) : NULL;
666 666
@@ -719,7 +719,7 @@ lockdownd_error_t lockdownd_client_new_with_handshake(idevice_t device, lockdown
719 ret = LOCKDOWN_E_INVALID_CONF; 719 ret = LOCKDOWN_E_INVALID_CONF;
720 } 720 }
721 721
722 if (LOCKDOWN_E_SUCCESS == ret && !userpref_has_device_public_key(client_loc->uuid)) 722 if (LOCKDOWN_E_SUCCESS == ret && !userpref_has_device_public_key(client_loc->udid))
723 ret = lockdownd_pair(client_loc, NULL); 723 ret = lockdownd_pair(client_loc, NULL);
724 724
725 /* in any case, we need to validate pairing to receive trusted host status */ 725 /* in any case, we need to validate pairing to receive trusted host status */
@@ -925,10 +925,10 @@ static lockdownd_error_t lockdownd_do_pair(lockdownd_client_t client, lockdownd_
925 if (!pairing_mode) { 925 if (!pairing_mode) {
926 if (!strcmp("Unpair", verb)) { 926 if (!strcmp("Unpair", verb)) {
927 /* remove public key from config */ 927 /* remove public key from config */
928 userpref_remove_device_public_key(client->uuid); 928 userpref_remove_device_public_key(client->udid);
929 } else { 929 } else {
930 /* store public key in config */ 930 /* store public key in config */
931 userpref_set_device_public_key(client->uuid, public_key); 931 userpref_set_device_public_key(client->udid, public_key);
932 } 932 }
933 } 933 }
934 } else { 934 } else {