const uint8_t match_key_descriptor[static FS_KEY_DESCRIPTOR_SIZE],
void **ret_decrypted, size_t *ret_decrypted_size) {
- char **i;
int r;
STRV_FOREACH(i, passwords) {
size_t *ret_volume_key_size) {
_cleanup_free_ char *xattr_buf = NULL;
- const char *xa;
int r;
assert(setup);
const EVP_CIPHER *cc;
size_t encrypted_size;
- r = genuine_random_bytes(salt, sizeof(salt), RANDOM_BLOCK);
+ r = crypto_random_bytes(salt, sizeof(salt));
if (r < 0)
return log_error_errno(r, "Failed to generate salt: %m");
_cleanup_(rm_rf_physical_and_freep) char *temporary = NULL;
_cleanup_(user_record_unrefp) UserRecord *new_home = NULL;
_cleanup_(erase_and_freep) void *volume_key = NULL;
- _cleanup_close_ int mount_fd = -1;
+ _cleanup_close_ int mount_fd = -EBADF;
struct fscrypt_policy policy = {};
size_t volume_key_size = 512 / 8;
_cleanup_free_ char *d = NULL;
uint32_t nr = 0;
const char *ip;
- char **i;
int r;
assert(h);
if (!volume_key)
return log_oom();
- r = genuine_random_bytes(volume_key, volume_key_size, RANDOM_BLOCK);
+ r = crypto_random_bytes(volume_key, volume_key_size);
if (r < 0)
return log_error_errno(r, "Failed to acquire volume key: %m");
_cleanup_free_ char *xattr_buf = NULL;
size_t volume_key_size = 0;
uint32_t slot = 0;
- const char *xa;
- char **p;
int r;
assert(h);