mirror of
https://github.com/darlinghq/darling-security.git
synced 2024-11-23 12:09:41 +00:00
43 lines
971 B
Objective-C
43 lines
971 B
Objective-C
//
|
|
// ISProtectedItemsController.m
|
|
// ISACLProtectedItems
|
|
//
|
|
// Copyright (c) 2014 Apple. All rights reserved.
|
|
//
|
|
|
|
#import "ISProtectedItemsController.h"
|
|
#import <spawn.h>
|
|
|
|
char * const pathToScrtiptFile = "/usr/local/bin/KeychainItemsAclTest.sh";
|
|
|
|
@implementation ISProtectedItemsController
|
|
|
|
- (NSArray *)specifiers
|
|
{
|
|
if (!_specifiers) {
|
|
_specifiers = [self loadSpecifiersFromPlistName:@"ISProtectedItems" target:self];
|
|
}
|
|
|
|
return _specifiers;
|
|
}
|
|
|
|
- (void)createBatchOfItems:(PSSpecifier *)specifier
|
|
{
|
|
char * const argv[] = { pathToScrtiptFile,
|
|
"op=create",
|
|
NULL };
|
|
|
|
posix_spawn(NULL, pathToScrtiptFile, NULL, NULL, argv, NULL);
|
|
}
|
|
|
|
- (void)deleteBatchOfItems:(PSSpecifier *)specifier
|
|
{
|
|
char * const argv[] = { pathToScrtiptFile,
|
|
"op=delete",
|
|
NULL };
|
|
|
|
posix_spawn(NULL, pathToScrtiptFile, NULL, NULL, argv, NULL);
|
|
}
|
|
|
|
@end
|