1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-03 05:18:09 +03:00

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

This commit is contained in:
Lennart Poettering 2024-11-07 15:07:18 +01:00
parent 7e2c2ff3ea
commit 4664989807

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 no 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)