Lines Matching refs:setup

18 int home_setup_directory(UserRecord *h, HomeSetup *setup) {  in home_setup_directory()  argument
24 assert(setup); in home_setup_directory()
25 assert(!setup->undo_mount); in home_setup_directory()
26 assert(setup->root_fd < 0); in home_setup_directory()
40 setup->undo_mount = true; in home_setup_directory()
52 setup->root_fd = open(HOME_RUNTIME_WORK_DIR, O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOFOLLOW); in home_setup_directory()
53 if (setup->root_fd < 0) in home_setup_directory()
62 HomeSetup *setup, in home_activate_directory() argument
72 assert(setup); in home_activate_directory()
78 r = home_setup(h, flags, setup, cache, &header_home); in home_activate_directory()
82 r = home_refresh(h, flags, setup, header_home, cache, NULL, &new_home); in home_activate_directory()
86 r = home_extend_embedded_identity(new_home, h, setup); in home_activate_directory()
91 setup->root_fd = safe_close(setup->root_fd); in home_activate_directory()
98 setup->undo_mount = false; in home_activate_directory()
100 setup->do_drop_caches = false; in home_activate_directory()
108 int home_create_directory_or_subvolume(UserRecord *h, HomeSetup *setup, UserRecord **ret_home) { in home_create_directory_or_subvolume() argument
119 assert(setup); in home_create_directory_or_subvolume()
186 setup->root_fd = open(temporary, O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOFOLLOW); in home_create_directory_or_subvolume()
187 if (setup->root_fd < 0) in home_create_directory_or_subvolume()
198 …r = home_shift_uid(setup->root_fd, HOME_RUNTIME_WORK_DIR, is_subvolume ? UID_NOBODY : h->uid, h->u… in home_create_directory_or_subvolume()
200 setup->undo_mount = true; /* If uidmaps worked we have a mount to undo again */ in home_create_directory_or_subvolume()
204 safe_close(setup->root_fd); in home_create_directory_or_subvolume()
206 setup->root_fd = fd_reopen(mount_fd, O_RDONLY|O_CLOEXEC|O_DIRECTORY); in home_create_directory_or_subvolume()
207 if (setup->root_fd < 0) in home_create_directory_or_subvolume()
208 … return log_error_errno(setup->root_fd, "Unable to convert mount fd into proper directory fd: %m"); in home_create_directory_or_subvolume()
213 r = home_populate(h, setup->root_fd); in home_create_directory_or_subvolume()
217 r = home_sync_and_statfs(setup->root_fd, NULL); in home_create_directory_or_subvolume()
242 setup->root_fd = safe_close(setup->root_fd); in home_create_directory_or_subvolume()
245 r = home_setup_undo_mount(setup, LOG_ERR); in home_create_directory_or_subvolume()
263 HomeSetup *setup, in home_resize_directory() argument
271 assert(setup); in home_resize_directory()
275 r = home_setup(h, flags, setup, cache, NULL); in home_resize_directory()
279 …r = home_load_embedded_identity(h, setup->root_fd, NULL, USER_RECONCILE_REQUIRE_NEWER_OR_EQUAL, ca… in home_resize_directory()
283 r = home_maybe_shift_uid(h, flags, setup); in home_resize_directory()
293 r = home_store_embedded_identity(new_home, setup->root_fd, h->uid, embedded_home); in home_resize_directory()
297 r = home_extend_embedded_identity(new_home, h, setup); in home_resize_directory()
301 r = home_sync_and_statfs(setup->root_fd, NULL); in home_resize_directory()
305 r = home_setup_done(setup); in home_resize_directory()