From d05ae226356cc674a055c784a4b9b75825162ba6 Mon Sep 17 00:00:00 2001 From: Jonathan Beck Date: Thu, 31 Jul 2008 21:54:16 -0700 Subject: Added a way to load HostID from a user specific config file. Signed-off-by: Matt Colyer --- src/ifuse.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/ifuse.c') diff --git a/src/ifuse.c b/src/ifuse.c index 8243109..6ee8eb5 100644 --- a/src/ifuse.c +++ b/src/ifuse.c @@ -35,6 +35,7 @@ #include "plist.h" #include "lockdown.h" #include "AFC.h" +#include "userpref.h" AFClient *afc = NULL; @@ -109,6 +110,7 @@ static int ifuse_read(const char *path, char *buf, size_t size, off_t offset, void *ifuse_init(struct fuse_conn_info *conn) { char *response = (char*)malloc(sizeof(char) * 2048); int bytes = 0, port = 0, i = 0; + char* host_id = NULL; file_handles = g_hash_table_new(g_int_hash, g_int_equal); @@ -123,11 +125,14 @@ void *ifuse_init(struct fuse_conn_info *conn) { fprintf(stderr, "Something went wrong in the lockdownd client.\n"); return NULL; } - - //if (!lockdownd_start_SSL_session(control, "29942970-207913891623273984")) { + + host_id = get_host_id(); + if (host_id && !lockdownd_start_SSL_session(control, host_id)) { fprintf(stderr, "Something went wrong in GnuTLS.\n"); return NULL; } + free(host_id); + host_id = NULL; port = lockdownd_start_service(control, "com.apple.afc"); if (!port) { -- cgit v1.1-32-gdbae