refactor: don't log error just for unsigned code (#49654)

This commit is contained in:
Noah Gregory
2026-02-05 01:26:17 -05:00
committed by GitHub
parent 41c7e9bb21
commit 50381a6d57

View File

@@ -106,7 +106,10 @@ bool ProcessSignatureIsSameWithCurrentApp(pid_t pid) {
status = SecCodeCheckValidity(process_code.get(), kSecCSDefaultFlags,
self_requirement.get());
if (status != errSecSuccess && status != errSecCSReqFailed) {
OSSTATUS_LOG(ERROR, status) << "SecCodeCheckValidity";
// If the code is unsigned, don't log that (it's not an actual error).
if (status != errSecCSUnsigned) {
OSSTATUS_LOG(ERROR, status) << "SecCodeCheckValidity";
}
return false;
}
return status == errSecSuccess;