/ ISACLProtectedItems / ISProtectedItemsController.m
ISProtectedItemsController.m
1 // 2 // ISProtectedItemsController.m 3 // ISACLProtectedItems 4 // 5 // Copyright (c) 2014 Apple. All rights reserved. 6 // 7 8 #import "ISProtectedItemsController.h" 9 #import <spawn.h> 10 11 char * const pathToScrtiptFile = "/usr/local/bin/KeychainItemsAclTest.sh"; 12 13 @implementation ISProtectedItemsController 14 15 - (NSArray *)specifiers 16 { 17 if (!_specifiers) { 18 _specifiers = [self loadSpecifiersFromPlistName:@"ISProtectedItems" target:self]; 19 } 20 21 return _specifiers; 22 } 23 24 - (void)createBatchOfItems:(PSSpecifier *)specifier 25 { 26 char * const argv[] = { pathToScrtiptFile, 27 "op=create", 28 NULL }; 29 30 posix_spawn(NULL, pathToScrtiptFile, NULL, NULL, argv, NULL); 31 } 32 33 - (void)deleteBatchOfItems:(PSSpecifier *)specifier 34 { 35 char * const argv[] = { pathToScrtiptFile, 36 "op=delete", 37 NULL }; 38 39 posix_spawn(NULL, pathToScrtiptFile, NULL, NULL, argv, NULL); 40 } 41 42 @end