assert_se(hdo = user_record_home_directory(h));
hd = strdupa_safe(hdo); /* copy the string out, since it might change later in the home record object */
- r = home_setup(h, 0, cache, setup, &header_home);
+ r = home_setup(h, 0, setup, cache, &header_home);
if (r < 0)
return r;
assert_se(hdo = user_record_home_directory(h));
hd = strdupa_safe(hdo);
- r = home_setup(h, 0, cache, setup, &header_home);
+ r = home_setup(h, 0, setup, cache, &header_home);
if (r < 0)
return r;
int home_resize_directory(
UserRecord *h,
HomeSetupFlags flags,
- PasswordCache *cache,
HomeSetup *setup,
+ PasswordCache *cache,
UserRecord **ret_home) {
_cleanup_(user_record_unrefp) UserRecord *embedded_home = NULL, *new_home = NULL;
assert(ret_home);
assert(IN_SET(user_record_storage(h), USER_DIRECTORY, USER_SUBVOLUME, USER_FSCRYPT));
- r = home_setup(h, flags, cache, setup, NULL);
+ r = home_setup(h, flags, setup, cache, NULL);
if (r < 0)
return r;
int home_setup_directory(UserRecord *h, HomeSetup *setup);
int home_activate_directory(UserRecord *h, HomeSetup *setup, PasswordCache *cache, UserRecord **ret_home);
int home_create_directory_or_subvolume(UserRecord *h, HomeSetup *setup, UserRecord **ret_home);
-int home_resize_directory(UserRecord *h, HomeSetupFlags flags, PasswordCache *cache, HomeSetup *setup, UserRecord **ret_home);
+int home_resize_directory(UserRecord *h, HomeSetupFlags flags, HomeSetup *setup, PasswordCache *cache, UserRecord **ret_home);
int home_setup_fscrypt(
UserRecord *h,
- const PasswordCache *cache,
- HomeSetup *setup) {
+ HomeSetup *setup,
+ const PasswordCache *cache) {
_cleanup_(erase_and_freep) void *volume_key = NULL;
struct fscrypt_policy policy = {};
#include "homework.h"
#include "user-record.h"
-int home_setup_fscrypt(UserRecord *h, const PasswordCache *cache, HomeSetup *setup);
+int home_setup_fscrypt(UserRecord *h, HomeSetup *setup, const PasswordCache *cache);
int home_create_fscrypt(UserRecord *h, HomeSetup *setup, char **effective_passwords, UserRecord **ret_home);
UserRecord *h,
HomeSetupFlags flags,
const char *force_image_path,
- PasswordCache *cache,
HomeSetup *setup,
+ PasswordCache *cache,
UserRecord **ret_luks_home) {
sd_id128_t found_partition_uuid, found_luks_uuid, found_fs_uuid;
h,
0,
NULL,
- cache,
setup,
+ cache,
&luks_home_record);
if (r < 0)
return r;
int home_resize_luks(
UserRecord *h,
HomeSetupFlags flags,
- PasswordCache *cache,
HomeSetup *setup,
+ PasswordCache *cache,
UserRecord **ret_home) {
uint64_t old_image_size, new_image_size, old_fs_size, new_fs_size, crypto_offset, new_partition_size;
new_image_size = new_image_size_rounded;
}
- r = home_setup_luks(h, flags, whole_disk, cache, setup, &header_home);
+ r = home_setup_luks(h, flags, whole_disk, setup, cache, &header_home);
if (r < 0)
return r;
#include "homework.h"
#include "user-record.h"
-int home_setup_luks(UserRecord *h, HomeSetupFlags flags, const char *force_image_path, PasswordCache *cache, HomeSetup *setup, UserRecord **ret_luks_home);
+int home_setup_luks(UserRecord *h, HomeSetupFlags flags, const char *force_image_path, HomeSetup *setup, PasswordCache *cache, UserRecord **ret_luks_home);
int home_activate_luks(UserRecord *h, HomeSetup *setup, PasswordCache *cache, UserRecord **ret_home);
int home_deactivate_luks(UserRecord *h, HomeSetup *setup);
int home_get_state_luks(UserRecord *h, HomeSetup *setup);
-int home_resize_luks(UserRecord *h, HomeSetupFlags flags, PasswordCache *cache, HomeSetup *setup, UserRecord **ret_home);
+int home_resize_luks(UserRecord *h, HomeSetupFlags flags, HomeSetup *setup, PasswordCache *cache, UserRecord **ret_home);
int home_passwd_luks(UserRecord *h, HomeSetup *setup, const PasswordCache *cache, char **effective_passwords);
int home_setup(
UserRecord *h,
HomeSetupFlags flags,
- PasswordCache *cache,
HomeSetup *setup,
+ PasswordCache *cache,
UserRecord **ret_header_home) {
int r;
switch (user_record_storage(h)) {
case USER_LUKS:
- return home_setup_luks(h, flags, NULL, cache, setup, ret_header_home);
+ return home_setup_luks(h, flags, NULL, setup, cache, ret_header_home);
case USER_SUBVOLUME:
case USER_DIRECTORY:
break;
case USER_FSCRYPT:
- r = home_setup_fscrypt(h, cache, setup);
+ r = home_setup_fscrypt(h, setup, cache);
break;
case USER_CIFS:
if (r < 0)
return r;
- r = home_setup(h, flags, &cache, &setup, &header_home);
+ r = home_setup(h, flags, &setup, &cache, &header_home);
if (r < 0)
return r;
switch (user_record_storage(h)) {
case USER_LUKS:
- return home_resize_luks(h, flags, &cache, &setup, ret);
+ return home_resize_luks(h, flags, &setup, &cache, ret);
case USER_DIRECTORY:
case USER_SUBVOLUME:
case USER_FSCRYPT:
- return home_resize_directory(h, flags, &cache, &setup, ret);
+ return home_resize_directory(h, flags, &setup, &cache, ret);
default:
return log_error_errno(SYNTHETIC_ERRNO(ENOTTY), "Resizing home directories of type '%s' currently not supported.", user_storage_to_string(user_record_storage(h)));
if (r < 0)
return r;
- r = home_setup(h, flags, &cache, &setup, &header_home);
+ r = home_setup(h, flags, &setup, &cache, &header_home);
if (r < 0)
return r;
if (r < 0)
return r;
- r = home_setup(h, flags, &cache, &setup, &header_home);
+ r = home_setup(h, flags, &setup, &cache, &header_home);
if (r < 0)
return r;
int home_setup_undo_mount(HomeSetup *setup, int level);
int home_setup_undo_dm(HomeSetup *setup, int level);
-int home_setup(UserRecord *h, HomeSetupFlags flags, PasswordCache *cache, HomeSetup *setup, UserRecord **ret_header_home);
+int home_setup(UserRecord *h, HomeSetupFlags flags, HomeSetup *setup, PasswordCache *cache, UserRecord **ret_header_home);
int home_refresh(UserRecord *h, HomeSetup *setup, UserRecord *header_home, PasswordCache *cache, struct statfs *ret_statfs, UserRecord **ret_new_home);