Lines Matching refs:ref

168         auto ref = buildLegacyKeyName(*name_prefix, raw_ref);  in installKeyLegacy()  local
170 add_key("logon", ref.c_str(), (void*)&fs_key, sizeof(fs_key), device_keyring); in installKeyLegacy()
175 LOG(DEBUG) << "Added key " << key_id << " (" << ref << ") to keyring " << device_keyring in installKeyLegacy()
184 static bool installProvisioningKey(const KeyBuffer& key, const std::string& ref, in installProvisioningKey() argument
196 key_serial_t key_id = add_key("fscrypt-provisioning", ref.c_str(), (void*)&provisioning_key, in installProvisioningKey()
199 PLOG(ERROR) << "Failed to insert fscrypt-provisioning key for " << ref in installProvisioningKey()
203 LOG(DEBUG) << "Added fscrypt-provisioning key for " << ref << " to session keyring"; in installProvisioningKey()
307 std::string ref = keyrefstring(policy->key_raw_ref); in installKey() local
308 LOG(DEBUG) << "Installed fscrypt key with ref " << ref << " to " << mountpoint; in installKey()
310 if (!installProvisioningKey(key, ref, arg->key_spec)) return false; in installKey()
320 auto ref = buildLegacyKeyName(*name_prefix, raw_ref); in evictKeyLegacy() local
321 auto key_serial = keyctl_search(device_keyring, "logon", ref.c_str(), 0); in evictKeyLegacy()
328 PLOG(ERROR) << "Failed to unlink key with serial " << key_serial << " ref " << ref; in evictKeyLegacy()
331 LOG(DEBUG) << "Unlinked key with serial " << key_serial << " ref " << ref; in evictKeyLegacy()
337 static bool evictProvisioningKey(const std::string& ref) { in evictProvisioningKey() argument
343 auto key_serial = keyctl_search(device_keyring, "fscrypt-provisioning", ref.c_str(), 0); in evictProvisioningKey()
345 PLOG(ERROR) << "Error searching session keyring for fscrypt-provisioning key for " << ref; in evictProvisioningKey()
350 PLOG(ERROR) << "Failed to unlink fscrypt-provisioning key for " << ref in evictProvisioningKey()
375 std::string ref = keyrefstring(policy.key_raw_ref); in evictKey() local
378 PLOG(ERROR) << "Failed to evict fscrypt key with ref " << ref << " from " << mountpoint; in evictKey()
382 LOG(DEBUG) << "Evicted fscrypt key with ref " << ref << " from " << mountpoint; in evictKey()
385 LOG(ERROR) << "Unexpected case: key with ref " << ref << " is still added by other users!"; in evictKey()
387 LOG(ERROR) << "Files still open after removing key with ref " << ref in evictKey()
391 if (!evictProvisioningKey(ref)) return false; in evictKey()
419 std::string ref = keyrefstring(policy.key_raw_ref); in reloadKeyFromSessionKeyring() local
420 auto key_serial = keyctl_search(device_keyring, "fscrypt-provisioning", ref.c_str(), 0); in reloadKeyFromSessionKeyring()
422 PLOG(ERROR) << "Failed to find fscrypt-provisioning key for " << ref in reloadKeyFromSessionKeyring()
427 LOG(DEBUG) << "Installing fscrypt-provisioning key for " << ref << " back into " << mountpoint in reloadKeyFromSessionKeyring()