summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2019-08-29 09:58:01 +0200
committerGravatar Nikias Bassen2019-08-29 09:58:01 +0200
commitc40c94562779c1973ef7e425752a2ac7b1ff0ab8 (patch)
tree89d30117731321d9ec6d6f8e5692a3bf0a77387d
parent11922928f1f4707efd1436f45e4c624b5eabc857 (diff)
downloadidevicerestore-c40c94562779c1973ef7e425752a2ac7b1ff0ab8.tar.gz
idevicerestore-c40c94562779c1973ef7e425752a2ac7b1ff0ab8.tar.bz2
tss: Properly apply RestoreRequestRules which can also be EPRO:false or ESEC:false instead of always assuming true
-rw-r--r--src/tss.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tss.c b/src/tss.c
index 9840893..2fae246 100644
--- a/src/tss.c
+++ b/src/tss.c
@@ -525,15 +525,15 @@ static void tss_entry_apply_restore_request_rules(plist_t tss_entry, plist_t par
plist_dict_next_item(actions, iter, &key, &value);
if (key == NULL)
break;
- uint8_t bv = 0;
+ uint8_t bv = 255;
plist_get_bool_val(value, &bv);
- if (bv) {
+ if (bv != 255) {
value2 = plist_dict_get_item(tss_entry, key);
if (value2) {
plist_dict_remove_item(tss_entry, key);
}
- debug("DEBUG: Adding action %s to TSS entry\n", key);
- plist_dict_set_item(tss_entry, key, plist_new_bool(1));
+ debug("DEBUG: Adding %s=%s to TSS entry\n", key, (bv) ? "true" : "false");
+ plist_dict_set_item(tss_entry, key, plist_new_bool(bv));
}
free(key);
}