ryantimwilson / rpms / systemd

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