chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df18d8c
)
ask-password: properly accept empty passwords from agent
author
Lennart Poettering
<lennart@poettering.net>
Wed, 13 Apr 2011 19:24:17 +0000
(21:24 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 13 Apr 2011 19:24:17 +0000
(21:24 +0200)
src/ask-password-api.c
patch
|
blob
|
history
diff --git
a/src/ask-password-api.c
b/src/ask-password-api.c
index da967ab7a1a638b10163fef471755a2652809d05..384cfc8f8058cdd12a0bb7bf3f6cdd123ae4a5ef 100644
(file)
--- a/
src/ask-password-api.c
+++ b/
src/ask-password-api.c
@@
-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;
}