From acc2d4c937c15b04b192e06d33fa24e79faff03b Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 10 Jun 2014 09:20:15 +0000 Subject: [PATCH] Forgotten update to use MGCopyAnswer for X-Unique-ID. M cfnetwork.diff git-svn-id: http://svn.telesphoreo.org/trunk@786 514c082c-b64e-11dc-b46d-3d985efe055d --- methods/http.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/methods/http.cc b/methods/http.cc index 0850421..6de79fa 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -50,6 +50,7 @@ #include #include +#include #include #include #include @@ -1554,6 +1555,12 @@ int main() CFRelease(plist); } + if (UniqueID_ == NULL) + if (void *libMobileGestalt = dlopen("/usr/lib/libMobileGestalt.dylib", RTLD_GLOBAL | RTLD_LAZY)) + if (CFStringRef (*$MGCopyAnswer)(CFStringRef) = (CFStringRef (*)(CFStringRef)) dlsym(libMobileGestalt, "MGCopyAnswer")) + UniqueID_ = $MGCopyAnswer(CFSTR("UniqueDeviceID")); + + if (UniqueID_ == NULL) if (void *lockdown = lockdown_connect()) { UniqueID_ = lockdown_copy_value(lockdown, NULL, kLockdownUniqueDeviceIDKey); lockdown_disconnect(lockdown); -- 2.45.2