tpoechtrager / cctools-port

Apple cctools port for Linux and *BSD
731 stars 168 forks source link

codesign issue with files with space #122

Open etrinh opened 2 years ago

etrinh commented 2 years ago

Hi,

Thank you very much for the sigtool addition! Just a small remark, it fails to sign files with spaces.

In file /cctools/include/stuff/port.h On line 60: snprintf(codesign_command, sizeof(codesign_command), "%s -s - -f %s", codesign, filename); \ Can be replaced with something like (quotes added): snprintf(codesign_command, sizeof(codesign_command), "%s -s - -f '%s'", codesign, filename); \

tpoechtrager commented 2 years ago

Hi, thanks for the hint. I think it should be replaced by execvp or something similar to get rid of the issue. Adding quotes doesn't fix the issue entirely. The entire macro needs some rework. There seem to be some obvious bugs.