]> git.ipfire.org Git - thirdparty/systemd.git/commit
ask-password-api: return if read_credential() failed 39591/head
authorDavid Tardon <dtardon@redhat.com>
Thu, 6 Nov 2025 13:04:32 +0000 (14:04 +0100)
committerDavid Tardon <dtardon@redhat.com>
Thu, 6 Nov 2025 13:23:35 +0000 (14:23 +0100)
commit399c9f847e222d6e62c553ac9ea2bebeb7c1be7f
tree517eab5482b3ccbb5b0ee00a827c8be6954cc0ce
parent5efcbae259826a184dc962822a4e060a21f5175c
ask-password-api: return if read_credential() failed

The current code causes assertion in strv_parse_nulstr() if
read_credential() results in an error different from ENXIO or ENOENT
(strace shows I'm getting EACCES):

 # homectl create waldo --real-name=Waldo --disk-size=200M

Before:

 Assertion 's || l <= 0' failed at src/basic/nulstr-util.c:32, function strv_parse_nulstr_full(). Aborting.

After:

 Failed to acquire password: Permission denied

Follow-up-for: 8806bb4bc7fa15d6ca46e81b8d535730209a3b66
src/shared/ask-password-api.c