+ /*
+ * determine whether the device has "trusted" the host (or other device)
+ */
+ trusted = lockdown_is_host_trusted(MY_PLUGIN_ID, NULL, &error);
+ n = (S_trustRequired != NULL) ? CFArrayGetCount(S_trustRequired) : 0;
+ if ((S_trustedHostCount != n) || (S_trustedHostAttached != trusted)) {
+ changed = TRUE;
+ }
+
+ SC_log(LOG_INFO, "%@, trusted = %s%s%@, %ld interface%s)%s",
+ reason,
+ trusted ? "Yes" : "No",
+ (error != NULL) ? ", error = " : "",
+ (error != NULL) ? error : CFSTR(""),
+ n,
+ (n == 1) ? "" : "s",
+ changed ? " *" : "");
+
+ if (changed) {
+ S_trustedHostAttached = trusted;
+ S_trustedHostCount = n;