Home | History | Annotate | Download | only in src

Lines Matching refs:cur

337 	struct seapp_context *cur;
379 cur = (struct seapp_context *) calloc(1, sizeof(struct seapp_context));
380 if (!cur)
385 free_seapp_context(cur);
393 free_seapp_context(cur);
400 cur->isSystemServer = true;
402 cur->isSystemServer = false;
404 free_seapp_context(cur);
408 cur->isAutoPlayAppSet = true;
410 cur->isAutoPlayApp = true;
412 cur->isAutoPlayApp = false;
414 free_seapp_context(cur);
418 cur->isOwnerSet = true;
420 cur->isOwner = true;
422 cur->isOwner = false;
424 free_seapp_context(cur);
428 if (cur->user.str) {
429 free_seapp_context(cur);
432 cur->user.str = strdup(value);
433 if (!cur->user.str) {
434 free_seapp_context(cur);
437 cur->user.len = strlen(cur->user.str);
438 if (cur->user.str[cur->user.len-1] == '*')
439 cur->user.is_prefix = 1;
441 if (cur->seinfo) {
442 free_seapp_context(cur);
445 cur->seinfo = strdup(value);
446 if (!cur->seinfo) {
447 free_seapp_context(cur);
451 free_seapp_context(cur);
455 if (cur->name.str) {
456 free_seapp_context(cur);
459 cur->name.str = strdup(value);
460 if (!cur->name.str) {
461 free_seapp_context(cur);
464 cur->name.len = strlen(cur->name.str);
465 if (cur->name.str[cur->name.len-1] == '*')
466 cur->name.is_prefix = 1;
468 if (cur->domain) {
469 free_seapp_context(cur);
472 cur->domain = strdup(value);
473 if (!cur->domain) {
474 free_seapp_context(cur);
478 if (cur->type) {
479 free_seapp_context(cur);
482 cur->type = strdup(value);
483 if (!cur->type) {
484 free_seapp_context(cur);
488 if (cur->levelFrom) {
489 free_seapp_context(cur);
493 cur->levelFrom = LEVELFROM_APP;
495 cur->levelFrom = LEVELFROM_NONE;
497 free_seapp_context(cur);
501 if (cur->levelFrom) {
502 free_seapp_context(cur);
506 cur->levelFrom = LEVELFROM_NONE;
508 cur->levelFrom = LEVELFROM_APP;
510 cur->levelFrom = LEVELFROM_USER;
512 cur->levelFrom = LEVELFROM_ALL;
514 free_seapp_context(cur);
518 if (cur->level) {
519 free_seapp_context(cur);
522 cur->level = strdup(value);
523 if (!cur->level) {
524 free_seapp_context(cur);
528 if (cur->path.str) {
529 free_seapp_context(cur);
532 cur->path.str = strdup(value);
533 if (!cur->path.str) {
534 free_seapp_context(cur);
537 cur->path.len = strlen(cur->path.str);
538 if (cur->path.str[cur->path.len-1] == '*')
539 cur->path.is_prefix = 1;
541 cur->isPrivAppSet = true;
543 cur->isPrivApp = true;
545 cur->isPrivApp = false;
547 free_seapp_context(cur);
551 free_seapp_context(cur);
560 if (cur->name.str &&
561 (!cur->seinfo || !strcmp(cur->seinfo, "default"))) {
563 seapp_contexts_file[policy_index], cur->name.str, lineno);
564 free_seapp_context(cur);
568 seapp_contexts[nspec] = cur;
583 cur = seapp_contexts[i];
587 cur->isSystemServer ? "true" : "false",
588 cur->isAutoPlayAppSet ? (cur->isAutoPlayApp ? "true" : "false") : "null",
589 cur->isOwnerSet ? (cur->isOwner ? "true" : "false") : "null",
590 cur->user.str,
591 cur->seinfo, cur->name.str, cur->path.str,
592 cur->isPrivAppSet ? (cur->isPrivApp ? "true" : "false") : "null",
593 cur->domain, cur->type, cur->level,
594 levelFromName[cur->levelFrom]);
670 struct seapp_context *cur
713 cur = seapp_contexts[i];
715 if (cur->isSystemServer != isSystemServer)
718 if (cur->isAutoPlayAppSet && cur->isAutoPlayApp != isAutoPlayApp)
721 if (cur->isOwnerSet && cur->isOwner != isOwner)
724 if (cur->user.str) {
725 if (cur->user.is_prefix) {
726 if (strncasecmp(username, cur->user.str, cur->user.len-1))
729 if (strcasecmp(username, cur->user.str))
734 if (cur->seinfo) {
735 if (!seinfo || strcasecmp(seinfo, cur->seinfo))
739 if (cur->name.str) {
743 if (cur->name.is_prefix) {
744 if (strncasecmp(pkgname, cur->name.str, cur->name.len-1))
747 if (strcasecmp(pkgname, cur->name.str))
752 if (cur->isPrivAppSet && cur->isPrivApp != isPrivApp)
755 if (cur->path.str) {
759 if (cur->path.is_prefix) {
760 if (strncmp(path, cur->path.str, cur->path.len-1))
763 if (strcmp(path, cur->path.str))
768 if (kind == SEAPP_TYPE && !cur->type)
770 else if (kind == SEAPP_DOMAIN && !cur->domain)
774 if (context_type_set(ctx, cur->type))
777 if (context_type_set(ctx, cur->domain))
781 if (cur->levelFrom != LEVELFROM_NONE) {
783 switch (cur->levelFrom) {
806 } else if (cur->level) {
807 if (context_range_set(ctx, cur->level))