ask-password: properly accept empty passwords from agent

This commit is contained in:
Lennart Poettering
2011-04-13 21:24:17 +02:00
parent df18d8c895
commit 8254a47589
+7 -1
View File
@@ -481,7 +481,13 @@ int ask_password_agent(
if (passphrase[0] == '+') {
char **l;
if (!(l = strv_parse_nulstr(passphrase+1, n-1))) {
if (n == 1)
l = strv_new("", NULL);
else
l = strv_parse_nulstr(passphrase+1, n-1);
/* An empty message refers to the empty password */
if (!l) {
r = -ENOMEM;
goto finish;
}