ask-password-api: add new "hup_fd" field to AskPasswordReq
This new field allows specification of an fd on which the password prompt logic will look for POLLHUP events for, and if seen will abort the query. The usecase for this is that when we query for a pw on behalf of a Varlink client we can abort the query automatically if the client dies.
This commit is contained in:
@@ -913,6 +913,7 @@ static int get_password(
|
||||
.keyring = "cryptsetup",
|
||||
.credential = "cryptsetup.passphrase",
|
||||
.until = until,
|
||||
.hup_fd = -EBADF,
|
||||
};
|
||||
|
||||
if (ignore_cached)
|
||||
@@ -1430,6 +1431,7 @@ static int crypt_activate_by_token_pin_ask_password(
|
||||
.keyring = keyring,
|
||||
.credential = credential,
|
||||
.until = until,
|
||||
.hup_fd = -EBADF,
|
||||
};
|
||||
|
||||
r = ask_password_auto(&req, flags, &pins);
|
||||
|
||||
Reference in New Issue
Block a user