From ecb3742ef8ddbab4ffc19fe3e0edcee9b3fc6f04 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Fri, 21 Mar 2014 20:04:42 +0100 Subject: lockdown: Move HostID generation closer to code setting it in pair record --- src/lockdown.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/lockdown.c b/src/lockdown.c index ab99ae2..844169a 100644 --- a/src/lockdown.c +++ b/src/lockdown.c @@ -854,8 +854,6 @@ static lockdownd_error_t pair_record_generate(lockdownd_client_t client, plist_t } debug_info("device public key follows:\n%.*s", public_key.size, public_key.data); - host_id = generate_uuid(); - *pair_record = plist_new_dict(); userpref_error_t uret = USERPREF_E_SUCCESS; @@ -878,6 +876,7 @@ static lockdownd_error_t pair_record_generate(lockdownd_client_t client, plist_t plist_dict_set_item(*pair_record, USERPREF_SYSTEM_BUID_KEY, plist_new_string(system_buid)); /* set HostID */ + host_id = generate_uuid(); pair_record_set_host_id(*pair_record, host_id); if (ret != LOCKDOWN_E_SUCCESS) { -- cgit v1.1-32-gdbae