From c40c94562779c1973ef7e425752a2ac7b1ff0ab8 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 29 Aug 2019 09:58:01 +0200 Subject: tss: Properly apply RestoreRequestRules which can also be EPRO:false or ESEC:false instead of always assuming true --- src/tss.c | 8 ++++---- 1 file 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); } -- cgit v1.1-32-gdbae