diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-09-06 08:00:32 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-09-06 08:00:32 +0200 |
commit | 204529d0fcde9a95119b489225620f36649c2f5b (patch) | |
tree | b23dcaaa757c559946a5edc780b60f1bd2e8c3e5 /src/home | |
parent | ask-password: refuse empty password strv (diff) | |
download | systemd-204529d0fcde9a95119b489225620f36649c2f5b.tar.xz systemd-204529d0fcde9a95119b489225620f36649c2f5b.zip |
tree-wide: check if non-empty password is acquired
Diffstat (limited to 'src/home')
-rw-r--r-- | src/home/homectl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/home/homectl.c b/src/home/homectl.c index a71548439e..cbb1c79f40 100644 --- a/src/home/homectl.c +++ b/src/home/homectl.c @@ -1244,6 +1244,8 @@ static int acquire_new_password( if (r < 0) return log_error_errno(r, "Failed to acquire password: %m"); + assert(!strv_isempty(first)); + question = mfree(question); if (asprintf(&question, "Please enter new password for user %s (repeat):", user_name) < 0) return log_oom(); |