From: Gibeom Gwon Date: Wed, 26 Aug 2020 13:56:01 +0000 (+0900) Subject: homed: remember the secret even when the for_state is FIXATING_FOR_ACQUIRE X-Git-Tag: v247-rc1~309 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d3d6e10daee37cd0636e15c2d4f29f14354cd72;p=thirdparty%2Fsystemd.git homed: remember the secret even when the for_state is FIXATING_FOR_ACQUIRE 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. --- diff --git a/src/home/homed-home.c b/src/home/homed-home.c index 28459f26861..db88d60c094 100644 --- a/src/home/homed-home.c +++ b/src/home/homed-home.c @@ -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);