valeriyvdovin / rpms / systemd

Forked from rpms/systemd 4 years ago
Clone

Blame SOURCES/0273-ask-password-don-t-abort-when-message-is-missing.patch

803fb7
From 2737fab0dba5ed238b4e0e927139e46e4911e1b4 Mon Sep 17 00:00:00 2001
803fb7
From: Lukas Nykryn <lnykryn@redhat.com>
803fb7
Date: Thu, 28 Jan 2016 16:01:51 +0100
803fb7
Subject: [PATCH] ask-password: don't abort when message is missing
803fb7
803fb7
This was fixed in upstream in
803fb7
e287086b8aa2558356af225a12d9bfea8e7d61ca
803fb7
add support for caching passwords in the kernel keyring
803fb7
803fb7
But we don't want that in rhel.
803fb7
803fb7
rhel-only
803fb7
803fb7
Resolves: #1261136
803fb7
---
803fb7
 src/shared/ask-password-api.c | 4 +++-
803fb7
 1 file changed, 3 insertions(+), 1 deletion(-)
803fb7
803fb7
diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c
803fb7
index 0a61dafc5..19baa6b55 100644
803fb7
--- a/src/shared/ask-password-api.c
803fb7
+++ b/src/shared/ask-password-api.c
803fb7
@@ -70,9 +70,11 @@ int ask_password_tty(
803fb7
                 POLL_INOTIFY
803fb7
         };
803fb7
 
803fb7
-        assert(message);
803fb7
         assert(_passphrase);
803fb7
 
803fb7
+        if (!message)
803fb7
+                message = "Password:";
803fb7
+
803fb7
         if (flag_file) {
803fb7
                 notify = inotify_init1(IN_CLOEXEC|IN_NONBLOCK);
803fb7
                 if (notify < 0) {