]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
homed: remember the secret even when the for_state is FIXATING_FOR_ACQUIRE
authorGibeom Gwon <gb.gwon@stackframe.dev>
Wed, 26 Aug 2020 13:56:01 +0000 (22:56 +0900)
committerLennart Poettering <lennart@poettering.net>
Wed, 2 Sep 2020 14:54:23 +0000 (16:54 +0200)
Remember the secret if the for_state is FIXATING_FOR_ACTIVATION or
FIXATING_FOR_ACQUIRE. This fixes login failures when logging in
to an unfixated user.

src/home/homed-home.c

index 28459f26861799300a899831a558a981e04c8556..db88d60c094249176110bd215b7a660e9f62c04d 100644 (file)
@@ -1115,7 +1115,7 @@ static int home_fixate_internal(
         if (r < 0)
                 return r;
 
-        if (for_state == HOME_FIXATING_FOR_ACTIVATION) {
+        if (IN_SET(for_state, HOME_FIXATING_FOR_ACTIVATION, HOME_FIXATING_FOR_ACQUIRE)) {
                 /* Remember the secret data, since we need it for the activation again, later on. */
                 user_record_unref(h->secret);
                 h->secret = user_record_ref(secret);