• Home
  • Raw
  • Download

Lines Matching refs:key

289     key: &KeyDescriptor,  in check_grant_permission()
291 let target_context = match key.domain { in check_grant_permission()
293 Domain::SELINUX => lookup_keystore2_key_context(key.nspace) in check_grant_permission()
295 _ => return Err(KsError::sys()).context(format!("Cannot grant {:?}.", key.domain)), in check_grant_permission()
338 key: &KeyDescriptor, in check_key_permission()
354 let target_context = match key.domain { in check_key_permission()
357 if caller_uid as i64 != key.nspace { in check_key_permission()
363 Domain::SELINUX => lookup_keystore2_key_context(key.nspace) in check_key_permission()
387 let tctx = lookup_keystore2_key_context(key.nspace) in check_key_permission()
397 .context(format!("Unknown domain value: \"{:?}\".", key.domain)) in check_key_permission()
528 let key = KeyDescriptor { domain: Domain::APP, nspace: 0, alias: None, blob: None }; in check_grant_permission_app() localVariable
529 check_grant_permission(&system_server_ctx, SYSTEM_SERVER_PERMISSIONS_NO_GRANT, &key) in check_grant_permission_app()
536 &key in check_grant_permission_app()
539 assert_perm_failed!(check_grant_permission(&shell_ctx, UNPRIV_PERMS, &key)); in check_grant_permission_app()
546 let key = KeyDescriptor { in check_grant_permission_selinux() localVariable
553 assert!(check_grant_permission(&sctx, NOT_GRANT_PERMS, &key).is_ok()); in check_grant_permission_selinux()
555 assert_perm_failed!(check_grant_permission(&sctx, KeyPerm::Grant.into(), &key)); in check_grant_permission_selinux()
558 assert_perm_failed!(check_grant_permission(&sctx, UNPRIV_PERMS, &key)); in check_grant_permission_selinux()
565 let key = KeyDescriptor { domain: Domain::GRANT, nspace: 0, alias: None, blob: None }; in check_key_permission_domain_grant() localVariable
571 &key, in check_key_permission_domain_grant()
579 &key, in check_key_permission_domain_grant()
590 let key = KeyDescriptor { domain: Domain::APP, nspace: 0, alias: None, blob: None }; in check_key_permission_domain_app() localVariable
592 assert!(check_key_permission(0, &system_server_ctx, KeyPerm::Use, &key, &None).is_ok()); in check_key_permission_domain_app()
593 assert!(check_key_permission(0, &system_server_ctx, KeyPerm::Delete, &key, &None).is_ok()); in check_key_permission_domain_app()
594 assert!(check_key_permission(0, &system_server_ctx, KeyPerm::GetInfo, &key, &None).is_ok()); in check_key_permission_domain_app()
595 assert!(check_key_permission(0, &system_server_ctx, KeyPerm::Rebind, &key, &None).is_ok()); in check_key_permission_domain_app()
596 assert!(check_key_permission(0, &system_server_ctx, KeyPerm::Update, &key, &None).is_ok()); in check_key_permission_domain_app()
597 assert!(check_key_permission(0, &system_server_ctx, KeyPerm::Grant, &key, &None).is_ok()); in check_key_permission_domain_app()
598 … assert!(check_key_permission(0, &system_server_ctx, KeyPerm::UseDevId, &key, &None).is_ok()); in check_key_permission_domain_app()
599 assert!(check_key_permission(0, &gmscore_app, KeyPerm::GenUniqueId, &key, &None).is_ok()); in check_key_permission_domain_app()
601 assert!(check_key_permission(0, &shell_ctx, KeyPerm::Use, &key, &None).is_ok()); in check_key_permission_domain_app()
602 assert!(check_key_permission(0, &shell_ctx, KeyPerm::Delete, &key, &None).is_ok()); in check_key_permission_domain_app()
603 assert!(check_key_permission(0, &shell_ctx, KeyPerm::GetInfo, &key, &None).is_ok()); in check_key_permission_domain_app()
604 assert!(check_key_permission(0, &shell_ctx, KeyPerm::Rebind, &key, &None).is_ok()); in check_key_permission_domain_app()
605 assert!(check_key_permission(0, &shell_ctx, KeyPerm::Update, &key, &None).is_ok()); in check_key_permission_domain_app()
606 assert_perm_failed!(check_key_permission(0, &shell_ctx, KeyPerm::Grant, &key, &None)); in check_key_permission_domain_app()
607 assert_perm_failed!(check_key_permission(0, &shell_ctx, KeyPerm::ReqForcedOp, &key, &None)); in check_key_permission_domain_app()
608 assert_perm_failed!(check_key_permission(0, &shell_ctx, KeyPerm::ManageBlob, &key, &None)); in check_key_permission_domain_app()
609 assert_perm_failed!(check_key_permission(0, &shell_ctx, KeyPerm::UseDevId, &key, &None)); in check_key_permission_domain_app()
610 assert_perm_failed!(check_key_permission(0, &shell_ctx, KeyPerm::GenUniqueId, &key, &None)); in check_key_permission_domain_app()
617 &key, in check_key_permission_domain_app()
625 &key, in check_key_permission_domain_app()
634 &key, in check_key_permission_domain_app()
644 let key = KeyDescriptor { in check_key_permission_domain_selinux() localVariable
651 assert!(check_key_permission(0, &sctx, KeyPerm::Use, &key, &None).is_ok()); in check_key_permission_domain_selinux()
652 assert!(check_key_permission(0, &sctx, KeyPerm::Delete, &key, &None).is_ok()); in check_key_permission_domain_selinux()
653 assert!(check_key_permission(0, &sctx, KeyPerm::GetInfo, &key, &None).is_ok()); in check_key_permission_domain_selinux()
654 assert!(check_key_permission(0, &sctx, KeyPerm::Rebind, &key, &None).is_ok()); in check_key_permission_domain_selinux()
655 assert!(check_key_permission(0, &sctx, KeyPerm::Update, &key, &None).is_ok()); in check_key_permission_domain_selinux()
658 assert!(check_key_permission(0, &sctx, KeyPerm::Grant, &key, &None).is_ok()); in check_key_permission_domain_selinux()
659 assert!(check_key_permission(0, &sctx, KeyPerm::ManageBlob, &key, &None).is_ok()); in check_key_permission_domain_selinux()
660 assert!(check_key_permission(0, &sctx, KeyPerm::UseDevId, &key, &None).is_ok()); in check_key_permission_domain_selinux()
661 assert!(check_key_permission(0, &sctx, KeyPerm::GenUniqueId, &key, &None).is_ok()); in check_key_permission_domain_selinux()
662 assert!(check_key_permission(0, &sctx, KeyPerm::ReqForcedOp, &key, &None).is_ok()); in check_key_permission_domain_selinux()
664 assert_perm_failed!(check_key_permission(0, &sctx, KeyPerm::Grant, &key, &None)); in check_key_permission_domain_selinux()
665 assert_perm_failed!(check_key_permission(0, &sctx, KeyPerm::ReqForcedOp, &key, &None)); in check_key_permission_domain_selinux()
666 assert_perm_failed!(check_key_permission(0, &sctx, KeyPerm::ManageBlob, &key, &None)); in check_key_permission_domain_selinux()
667 assert_perm_failed!(check_key_permission(0, &sctx, KeyPerm::UseDevId, &key, &None)); in check_key_permission_domain_selinux()
668 assert_perm_failed!(check_key_permission(0, &sctx, KeyPerm::GenUniqueId, &key, &None)); in check_key_permission_domain_selinux()
676 let key = KeyDescriptor { in check_key_permission_domain_blob() localVariable
684 check_key_permission(0, &sctx, KeyPerm::Use, &key, &None) in check_key_permission_domain_blob()
686 assert_perm_failed!(check_key_permission(0, &sctx, KeyPerm::Use, &key, &None)); in check_key_permission_domain_blob()
693 let key = KeyDescriptor { domain: Domain::KEY_ID, nspace: 0, alias: None, blob: None }; in check_key_permission_domain_key_id() localVariable
701 &key, in check_key_permission_domain_key_id()