diff options
author | Martin Szulecki | 2013-09-21 20:35:34 +0200 |
---|---|---|
committer | Martin Szulecki | 2013-09-21 20:35:34 +0200 |
commit | 6d12c752a837f7709ea22d7975577201d5e5cafe (patch) | |
tree | 9b29706f5877dd9741d810aca63035a57821dbc9 | |
parent | 1d9f34fb5fa49c31ee30bdc4c98dc9a43bc5afb2 (diff) | |
download | libimobiledevice-6d12c752a837f7709ea22d7975577201d5e5cafe.tar.gz libimobiledevice-6d12c752a837f7709ea22d7975577201d5e5cafe.tar.bz2 |
lockdown: Only sent EscrowBag if we are running in a secure session
-rw-r--r-- | src/lockdown.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lockdown.c b/src/lockdown.c index 087d673..4ed3d76 100644 --- a/src/lockdown.c +++ b/src/lockdown.c @@ -1685,8 +1685,12 @@ lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char plist_dict_add_label(dict, client->label); plist_dict_insert_item(dict,"Request", plist_new_string("StartService")); plist_dict_insert_item(dict,"Service", plist_new_string(identifier)); - userpref_device_record_get_value(client->udid, USERPREF_ESCROW_BAG_KEY, &escrow_bag); - plist_dict_insert_item(dict,"EscrowBag", escrow_bag); + + /* send EscrowBag if within a session */ + if (client->session_id) { + userpref_device_record_get_value(client->udid, USERPREF_ESCROW_BAG_KEY, &escrow_bag); + plist_dict_insert_item(dict,"EscrowBag", escrow_bag); + } /* send to device */ ret = lockdownd_send(client, dict); |