diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/ask-password-api.c | 9 | ||||
-rw-r--r-- | src/shared/ask-password-api.h | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index eb40995010..c3c78b69fb 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -298,6 +298,7 @@ fail: int ask_password_agent( const char *message, const char *icon, + const char *id, usec_t until, bool accept_cached, char ***_passphrases) { @@ -373,6 +374,9 @@ int ask_password_agent( if (icon) fprintf(f, "Icon=%s\n", icon); + if (id) + fprintf(f, "Id=%s\n", id); + fflush(f); if (ferror(f)) { @@ -537,7 +541,8 @@ finish: return r; } -int ask_password_auto(const char *message, const char *icon, usec_t until, bool accept_cached, char ***_passphrases) { +int ask_password_auto(const char *message, const char *icon, const char *id, + usec_t until, bool accept_cached, char ***_passphrases) { assert(message); assert(_passphrases); @@ -556,5 +561,5 @@ int ask_password_auto(const char *message, const char *icon, usec_t until, bool *_passphrases = l; return r; } else - return ask_password_agent(message, icon, until, accept_cached, _passphrases); + return ask_password_agent(message, icon, id, until, accept_cached, _passphrases); } diff --git a/src/shared/ask-password-api.h b/src/shared/ask-password-api.h index 288a0f48cf..3839a2df0f 100644 --- a/src/shared/ask-password-api.h +++ b/src/shared/ask-password-api.h @@ -25,6 +25,8 @@ int ask_password_tty(const char *message, usec_t until, const char *flag_file, char **_passphrase); -int ask_password_agent(const char *message, const char *icon, usec_t until, bool accept_cached, char ***_passphrases); +int ask_password_agent(const char *message, const char *icon, const char *id, + usec_t until, bool accept_cached, char ***_passphrases); -int ask_password_auto(const char *message, const char *icon, usec_t until, bool accept_cached, char ***_passphrases); +int ask_password_auto(const char *message, const char *icon, const char *id, + usec_t until, bool accept_cached, char ***_passphrases); |