mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
homework: Cleanup home_store_embedded_identity
This function took an extra argument that it never used. This commit cleans that up
This commit is contained in:
@@ -290,7 +290,7 @@ int home_resize_directory(
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = home_store_embedded_identity(new_home, setup->root_fd, h->uid, embedded_home);
|
||||
r = home_store_embedded_identity(new_home, setup->root_fd, embedded_home);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
@@ -3445,7 +3445,7 @@ int home_resize_luks(
|
||||
/* → Shrink */
|
||||
|
||||
if (!FLAGS_SET(flags, HOME_SETUP_RESIZE_DONT_SYNC_IDENTITIES)) {
|
||||
r = home_store_embedded_identity(new_home, setup->root_fd, h->uid, embedded_home);
|
||||
r = home_store_embedded_identity(new_home, setup->root_fd, embedded_home);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
@@ -3533,7 +3533,7 @@ int home_resize_luks(
|
||||
|
||||
} else { /* → Grow */
|
||||
if (!FLAGS_SET(flags, HOME_SETUP_RESIZE_DONT_SYNC_IDENTITIES)) {
|
||||
r = home_store_embedded_identity(new_home, setup->root_fd, h->uid, embedded_home);
|
||||
r = home_store_embedded_identity(new_home, setup->root_fd, embedded_home);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -638,7 +638,7 @@ int home_load_embedded_identity(
|
||||
*
|
||||
* · The record we got passed from the host
|
||||
* · The record included in the LUKS header (only if LUKS is used)
|
||||
* · The record in the home directory itself (~.identity)
|
||||
* · The record in the home directory itself (~/.identity)
|
||||
*
|
||||
* Now we have to reconcile all three, and let the newest one win. */
|
||||
|
||||
@@ -698,13 +698,12 @@ int home_load_embedded_identity(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int home_store_embedded_identity(UserRecord *h, int root_fd, uid_t uid, UserRecord *old_home) {
|
||||
int home_store_embedded_identity(UserRecord *h, int root_fd, UserRecord *old_home) {
|
||||
_cleanup_(user_record_unrefp) UserRecord *embedded = NULL;
|
||||
int r;
|
||||
|
||||
assert(h);
|
||||
assert(root_fd >= 0);
|
||||
assert(uid_is_valid(uid));
|
||||
|
||||
r = user_record_clone(h, USER_RECORD_EXTRACT_EMBEDDED|USER_RECORD_PERMISSIVE, &embedded);
|
||||
if (r < 0)
|
||||
@@ -848,7 +847,7 @@ int home_refresh(
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = home_store_embedded_identity(new_home, setup->root_fd, h->uid, embedded_home);
|
||||
r = home_store_embedded_identity(new_home, setup->root_fd, embedded_home);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
@@ -1068,7 +1067,7 @@ int home_populate(UserRecord *h, int dir_fd) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = home_store_embedded_identity(h, dir_fd, h->uid, NULL);
|
||||
r = home_store_embedded_identity(h, dir_fd, NULL);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
@@ -1608,7 +1607,7 @@ static int home_update(UserRecord *h, UserRecord **ret) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = home_store_embedded_identity(new_home, setup.root_fd, h->uid, embedded_home);
|
||||
r = home_store_embedded_identity(new_home, setup.root_fd, embedded_home);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
@@ -1733,7 +1732,7 @@ static int home_passwd(UserRecord *h, UserRecord **ret_home) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = home_store_embedded_identity(new_home, setup.root_fd, h->uid, embedded_home);
|
||||
r = home_store_embedded_identity(new_home, setup.root_fd, embedded_home);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ int home_maybe_shift_uid(UserRecord *h, HomeSetupFlags flags, HomeSetup *setup);
|
||||
int home_populate(UserRecord *h, int dir_fd);
|
||||
|
||||
int home_load_embedded_identity(UserRecord *h, int root_fd, UserRecord *header_home, UserReconcileMode mode, PasswordCache *cache, UserRecord **ret_embedded_home, UserRecord **ret_new_home);
|
||||
int home_store_embedded_identity(UserRecord *h, int root_fd, uid_t uid, UserRecord *old_home);
|
||||
int home_store_embedded_identity(UserRecord *h, int root_fd, UserRecord *old_home);
|
||||
int home_extend_embedded_identity(UserRecord *h, UserRecord *used, HomeSetup *setup);
|
||||
|
||||
int user_record_authenticate(UserRecord *h, UserRecord *secret, PasswordCache *cache, bool strict_verify);
|
||||
|
||||
Reference in New Issue
Block a user