| 6953 | |
| 6954 | #ifdef __APPLE__ |
| 6955 | static int cbm_macos_adhoc_sign(const char *binary_path) { |
| 6956 | /* Remove quarantine xattr (best effort — may not exist) */ |
| 6957 | const char *xattr_argv[] = {"/usr/bin/xattr", "-d", "com.apple.quarantine", binary_path, NULL}; |
| 6958 | (void)cbm_exec_no_shell(xattr_argv); |
| 6959 | |
| 6960 | /* Ad-hoc sign (required for arm64, harmless for x86_64) */ |
| 6961 | const char *sign_argv[] = {"/usr/bin/codesign", "--sign", "-", "--force", binary_path, NULL}; |
| 6962 | return cbm_exec_no_shell(sign_argv); |
| 6963 | } |
| 6964 | #endif |
| 6965 | |
| 6966 | #ifdef CBM_CLI_ENABLE_TEST_API |
no test coverage detected