fix(activation): Fix AFC service, deletescript return, session mutation

Critical: deletescript now uses com.apple.afc2 for root filesystem
access. deletescript_run returns -1 on errors. session no longer
mutates caller's handshake_response plist. Added plist_mem_free
documentation to activation.h. Fixed version parsing to reject negatives.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
tr4m0ryp 2026-04-05 03:32:08 +02:00
parent 4e6f7b70ee
commit 0a02acd634
6 changed files with 64 additions and 27 deletions

View file

@ -25,8 +25,9 @@ int activation_get_state(device_info_t *dev, char *buf, size_t buf_len);
/*
* activation_get_session_info -- Retrieve the DRM handshake session blob.
* On success, *blob_xml is set to a malloc'd XML string and *blob_len to
* its length. Caller must free(*blob_xml).
* On success, *blob_xml is set to an XML string and *blob_len to its length.
* The string is allocated by libplist; caller must free with plist_mem_free(),
* NOT free() or plist_free().
* Returns 0 on success, -1 on error.
*/
int activation_get_session_info(device_info_t *dev,
@ -34,8 +35,9 @@ int activation_get_session_info(device_info_t *dev,
/*
* activation_get_info -- Retrieve full activation info from the device.
* On success, *info_xml is set to a malloc'd XML string and *info_len to
* its length. Caller must free(*info_xml).
* On success, *info_xml is set to an XML string and *info_len to its length.
* The string is allocated by libplist; caller must free with plist_mem_free(),
* NOT free() or plist_free().
* Returns 0 on success, -1 on error.
*/
int activation_get_info(device_info_t *dev,