X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/80e2389990082500d76eb566d4946be3e786c3ef..d8f41ccd20de16f8ebe2ccc84d47bf1cb2b26bbb:/SecurityTests/clxutils/trustApps/trustApps.cpp diff --git a/SecurityTests/clxutils/trustApps/trustApps.cpp b/SecurityTests/clxutils/trustApps/trustApps.cpp new file mode 100644 index 00000000..f555b597 --- /dev/null +++ b/SecurityTests/clxutils/trustApps/trustApps.cpp @@ -0,0 +1,153 @@ +/* + * trustApps.cpp - set list of trusted apps for specified executable + */ +#include +#include +#include +#include +#include + +static void usage(char **argv) +{ + printf("Usage: %s keychain [-q(uiet)] executable ...\n", argv[0]); + exit(1); +} + +int main(int argc, char **argv) +{ + if(argc < 3) { + usage(argv); + } + + const char *keychainName = argv[1]; + int nextArg; + bool quiet = false; + OSStatus ortn; + + for(nextArg=2; nextArg