[vlc-devel] [PATCH v3 02/11] keystore: prevent UI interaction if no_interact
Thomas Guillem
thomas at gllm.fr
Tue Dec 22 09:32:52 UTC 2020
On Tue, Dec 22, 2020, at 09:08, Rémi Denis-Courmont wrote:
> Le maanantaina 21. joulukuuta 2020, 19.54.27 EET Thomas Guillem a écrit :
> > ---
> > 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;
>
> That does not seem right. We ought to be able to retrieve credentials in an
> already opened keyring/wallet/whatever without interaction. IMO, it really
> sucks to blindly disable any and all preparsing.
You can't know if requesting the system keystore will require an UI interaction, even if it has been previously unlocked.
That is why the memory keystore come into action.
The user unlock the system keystore from a UI action, the memory keystore is saved, and next preparsing requests can be done in background without any UI interaction, using the memory keystore.
>
> >
> > /* DIALOG is the last way to fetch credential, use it until credentials
> > are * valid or until the user cancel it */
>
>
> --
> Rémi Denis-Courmont
> http://www.remlab.net/
>
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list