ask-password-api: move timeout into AskPasswordRequest structure too
This commit is contained in:
@@ -912,12 +912,13 @@ static int get_password(
|
||||
.id = id,
|
||||
.keyring = "cryptsetup",
|
||||
.credential = "cryptsetup.passphrase",
|
||||
.until = until,
|
||||
};
|
||||
|
||||
if (ignore_cached)
|
||||
flags &= ~ASK_PASSWORD_ACCEPT_CACHED;
|
||||
|
||||
r = ask_password_auto(&req, until, flags, &passwords);
|
||||
r = ask_password_auto(&req, flags, &passwords);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to query password: %m");
|
||||
|
||||
@@ -938,7 +939,7 @@ static int get_password(
|
||||
req.message = text;
|
||||
req.id = id;
|
||||
|
||||
r = ask_password_auto(&req, until, flags, &passwords2);
|
||||
r = ask_password_auto(&req, flags, &passwords2);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to query verification password: %m");
|
||||
|
||||
@@ -1428,9 +1429,10 @@ static int crypt_activate_by_token_pin_ask_password(
|
||||
.icon = "drive-harddisk",
|
||||
.keyring = keyring,
|
||||
.credential = credential,
|
||||
.until = until,
|
||||
};
|
||||
|
||||
r = ask_password_auto(&req, until, flags, &pins);
|
||||
r = ask_password_auto(&req, flags, &pins);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user