Lines Matching refs:arg
243 fscrypt_add_key_arg* arg) { in installFsKeyringKey() argument
244 if (options.use_hw_wrapped_key) arg->__flags |= __FSCRYPT_ADD_KEY_FLAG_HW_WRAPPED; in installFsKeyringKey()
252 if (ioctl(fd, FS_IOC_ADD_ENCRYPTION_KEY, arg) != 0) { in installFsKeyringKey()
266 struct fscrypt_add_key_arg* arg = (struct fscrypt_add_key_arg*)arg_buf.data(); in installKey() local
278 if (!buildKeySpecifier(&arg->key_spec, *policy)) { in installKey()
288 arg->key_spec.type = FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER; in installKey()
295 arg->raw_size = key.size(); in installKey()
296 memcpy(arg->raw, key.data(), key.size()); in installKey()
298 if (!installFsKeyringKey(mountpoint, options, arg)) return false; in installKey()
300 if (arg->key_spec.type == FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER) { in installKey()
303 std::string((char*)arg->key_spec.u.identifier, FSCRYPT_KEY_IDENTIFIER_SIZE); in installKey()
308 if (!installProvisioningKey(key, ref, arg->key_spec)) return false; in installKey()
366 struct fscrypt_remove_key_arg arg; in evictKey() local
367 memset(&arg, 0, sizeof(arg)); in evictKey()
369 if (!buildKeySpecifier(&arg.key_spec, policy)) { in evictKey()
375 if (ioctl(fd, FS_IOC_REMOVE_ENCRYPTION_KEY, &arg) != 0) { in evictKey()
381 if (arg.removal_status_flags & FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS) { in evictKey()
384 } else if (arg.removal_status_flags & FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY) { in evictKey()
428 struct fscrypt_add_key_arg arg; in reloadKeyFromSessionKeyring() local
429 memset(&arg, 0, sizeof(arg)); in reloadKeyFromSessionKeyring()
430 if (!buildKeySpecifier(&arg.key_spec, policy)) return false; in reloadKeyFromSessionKeyring()
431 arg.key_id = key_serial; in reloadKeyFromSessionKeyring()
432 if (!installFsKeyringKey(mountpoint, policy.options, &arg)) return false; in reloadKeyFromSessionKeyring()