• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/Security-55471.14.18/libsecurity_codesigning/lib/

Lines Matching refs:task

65 	SecTaskRef task = (SecTaskRef) cfTask;
67 if (task->entitlements != NULL) {
68 CFRelease(task->entitlements);
69 task->entitlements = NULL;
79 SecTaskRef task = (SecTaskRef) cfTask;
81 int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, task->pid};
89 return CFStringCreateWithFormat(CFGetAllocator(task), NULL, CFSTR("%s[%" PRIdPID "]"), task_name, task->pid);
122 SecTaskRef task = (SecTaskRef) _CFRuntimeCreateInstance(allocator, SecTaskGetTypeID(), extra, NULL);
123 if (task != NULL) {
124 task->pid = pid;
125 task->entitlementsLoaded = false;
126 task->entitlements = NULL;
129 return task;
134 SecTaskRef task;
136 task = SecTaskCreateWithPID(allocator, audit_token_to_pid(token));
137 if (task != NULL) {
139 task->token_storage = token;
140 task->token = &task->token_storage;
144 return task;
153 * Determine if the given task meets a specified requirement.
156 SecTaskValidateForRequirement(SecTaskRef task, CFStringRef requirement)
161 pid_t pid = task->pid;
194 csops_task(SecTaskRef task, int ops, void *blob, size_t size)
196 if (task->token)
197 return csops_audittoken(task->pid, ops, blob, size, task->token);
199 return csops(task->pid, ops, blob, size);
202 static int SecTaskLoadEntitlements(SecTaskRef task, CFErrorRef *error)
209 ret = csops_task(task, CS_OPS_ENTITLEMENTS_BLOB, &header, sizeof(header));
212 task->entitlementsLoaded = true;
228 ret = csops_task(task, CS_OPS_ENTITLEMENTS_BLOB, CFDataGetMutableBytePtr(data), bufferlen);
234 task->entitlements = CFPropertyListCreateWithData(NULL, data, 0, NULL, error);
235 task->entitlementsLoaded = true;
245 CFTypeRef SecTaskCopyValueForEntitlement(SecTaskRef task, CFStringRef entitlement, CFErrorRef *error)
248 if (task->entitlementsLoaded == false) {
249 SecTaskLoadEntitlements(task, error);
253 if (task->entitlements != NULL) {
254 value = CFDictionaryGetValue(task->entitlements, entitlement);
265 CFDictionaryRef SecTaskCopyValuesForEntitlements(SecTaskRef task, CFArrayRef entitlements, CFErrorRef *error)
268 if (task->entitlementsLoaded == false) {
269 SecTaskLoadEntitlements(task, error);
276 if (task->entitlementsLoaded == true) {
279 values = CFDictionaryCreateMutable(CFGetAllocator(task), count, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
280 if (task->entitlements != NULL) {
283 CFTypeRef value = CFDictionaryGetValue(task->entitlements, entitlement);