| 8138 | |
| 8139 | #ifdef __APPLE__ |
| 8140 | static int cbm_macos_adhoc_sign(const char *binary_path) { |
| 8141 | /* Remove quarantine xattr (best effort — may not exist) */ |
| 8142 | const char *xattr_argv[] = {"/usr/bin/xattr", "-d", "com.apple.quarantine", binary_path, NULL}; |
| 8143 | (void)cbm_exec_no_shell(xattr_argv); |
| 8144 | |
| 8145 | /* Ad-hoc sign (required for arm64, harmless for x86_64) */ |
| 8146 | const char *sign_argv[] = {"/usr/bin/codesign", "--sign", "-", "--force", binary_path, NULL}; |
| 8147 | return cbm_exec_no_shell(sign_argv); |
| 8148 | } |
| 8149 | #endif |
| 8150 | |
| 8151 | #ifdef CBM_CLI_ENABLE_TEST_API |
no test coverage detected