| 7260 | |
| 7261 | #ifdef __APPLE__ |
| 7262 | static int cbm_macos_adhoc_sign(const char *binary_path) { |
| 7263 | /* Remove quarantine xattr (best effort — may not exist) */ |
| 7264 | const char *xattr_argv[] = {"/usr/bin/xattr", "-d", "com.apple.quarantine", binary_path, NULL}; |
| 7265 | (void)cbm_exec_no_shell(xattr_argv); |
| 7266 | |
| 7267 | /* Ad-hoc sign (required for arm64, harmless for x86_64) */ |
| 7268 | const char *sign_argv[] = {"/usr/bin/codesign", "--sign", "-", "--force", binary_path, NULL}; |
| 7269 | return cbm_exec_no_shell(sign_argv); |
| 7270 | } |
| 7271 | #endif |
| 7272 | |
| 7273 | #ifdef CBM_CLI_ENABLE_TEST_API |
no test coverage detected