[vlc-devel] [PATCH v3 02/11] keystore: prevent UI interaction if no_interact

Thomas Guillem thomas at gllm.fr
Mon Dec 21 17:54:27 UTC 2020


---
 src/misc/keystore.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/misc/keystore.c b/src/misc/keystore.c
index 31aaf39e9ec..a69a73d3f6e 100644
--- a/src/misc/keystore.c
+++ b/src/misc/keystore.c
@@ -374,7 +374,11 @@ vlc_credential_clean(vlc_credential *p_credential)
 static int
 credential_get_next_order(vlc_credential *p_credential, vlc_object_t *p_parent)
 {
-    (void) p_parent;
+    /* Don't query the system keystore (may cause UI interaction by prompting
+     * pin/passphrase/...) or prompt a dialog in case of no interact. */
+    if (p_parent->no_interact
+     && p_credential->i_get_order == GET_FROM_MEMORY_KEYSTORE)
+        return GET_FROM_INIT;
 
     /* DIALOG is the last way to fetch credential, use it until credentials are
      * valid or until the user cancel it */
-- 
2.29.2



More information about the vlc-devel mailing list