diff options
Diffstat (limited to 'src/ifuse.c')
| -rw-r--r-- | src/ifuse.c | 9 |
1 files changed, 7 insertions, 2 deletions
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 @@ | |||
| 35 | #include "plist.h" | 35 | #include "plist.h" |
| 36 | #include "lockdown.h" | 36 | #include "lockdown.h" |
| 37 | #include "AFC.h" | 37 | #include "AFC.h" |
| 38 | #include "userpref.h" | ||
| 38 | 39 | ||
| 39 | 40 | ||
| 40 | AFClient *afc = NULL; | 41 | AFClient *afc = NULL; |
| @@ -109,6 +110,7 @@ static int ifuse_read(const char *path, char *buf, size_t size, off_t offset, | |||
| 109 | void *ifuse_init(struct fuse_conn_info *conn) { | 110 | void *ifuse_init(struct fuse_conn_info *conn) { |
| 110 | char *response = (char*)malloc(sizeof(char) * 2048); | 111 | char *response = (char*)malloc(sizeof(char) * 2048); |
| 111 | int bytes = 0, port = 0, i = 0; | 112 | int bytes = 0, port = 0, i = 0; |
| 113 | char* host_id = NULL; | ||
| 112 | 114 | ||
| 113 | file_handles = g_hash_table_new(g_int_hash, g_int_equal); | 115 | file_handles = g_hash_table_new(g_int_hash, g_int_equal); |
| 114 | 116 | ||
| @@ -123,11 +125,14 @@ void *ifuse_init(struct fuse_conn_info *conn) { | |||
| 123 | fprintf(stderr, "Something went wrong in the lockdownd client.\n"); | 125 | fprintf(stderr, "Something went wrong in the lockdownd client.\n"); |
| 124 | return NULL; | 126 | return NULL; |
| 125 | } | 127 | } |
| 126 | 128 | ||
| 127 | //if (!lockdownd_start_SSL_session(control, "29942970-207913891623273984")) { | 129 | host_id = get_host_id(); |
| 130 | if (host_id && !lockdownd_start_SSL_session(control, host_id)) { | ||
| 128 | fprintf(stderr, "Something went wrong in GnuTLS.\n"); | 131 | fprintf(stderr, "Something went wrong in GnuTLS.\n"); |
| 129 | return NULL; | 132 | return NULL; |
| 130 | } | 133 | } |
| 134 | free(host_id); | ||
| 135 | host_id = NULL; | ||
| 131 | 136 | ||
| 132 | port = lockdownd_start_service(control, "com.apple.afc"); | 137 | port = lockdownd_start_service(control, "com.apple.afc"); |
| 133 | if (!port) { | 138 | if (!port) { |
