ask-password: add comment with well-known errors from ask_password_auto()

This commit is contained in:
Lennart Poettering
2025-01-02 16:39:30 +01:00
parent 066f6bfb62
commit 7fd0ea6cf6
+11
View File
@@ -1165,6 +1165,17 @@ int ask_password_auto(
assert(ret);
/* Returns the following well-known errors:
*
* -ETIME → a timeout was specified and hit
* -EUNATCH → couldn't ask interactively and no cached password available either
* -ENOENT → the specified flag file disappeared
* -ECANCELED → the user explicitly cancelled the request
* -EINTR → SIGINT/SIGTERM where received during the query
* -ENOEXEC → headless mode was requested but no password could be acquired non-interactively
* -ECONNRESET → a POLLHUP has been seen on the specified hup_fd
*/
if (!FLAGS_SET(flags, ASK_PASSWORD_NO_CREDENTIAL) && req && req->credential) {
r = ask_password_credential(req, flags, ret);
if (r != -ENOKEY)