[PATCH 09/10] Call libstoken to generate one-time passwords

Woodhouse, David david.woodhouse at intel.com
Wed Oct 10 07:20:58 EDT 2012


On Sun, 2012-10-07 at 18:03 -0700, Kevin Cernekee wrote:
> +       while (1) {
> +               int n_prompts = 0;
> +
> +               if (stoken_devid_required(stoken_ctx)) {
> +                       n_prompts++;
> +                       if (prompt_user(_("Device ID (for software token): "),
> +                                       devid, USER_BUFLEN, 0) <= 0)
> +                               goto skip;
> +               }
> +               if (stoken_pass_required(stoken_ctx)) {
> +                       n_prompts++;
> +                       if (prompt_user(_("Password (for software token): "),
> +                                       pass, USER_BUFLEN, 1) <= 0)
> +                               goto skip;
> +               }

Hm. This doesn't work for the GUI, surely? Your prompt_user() function
is unconditionally using the terminal. This should go through something
like the request_passphrase() function in ssl.c. It may end up in
prompt_user() from the default terminal-based process_auth_form()
function, but only if that's appropriate.

I'd like to check that this is working properly with the NM auth-dialog.

-- 
                   Sent with MeeGo's ActiveSync support.

David Woodhouse                            Open Source Technology Centre
David.Woodhouse at intel.com                              Intel Corporation


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4370 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20121010/d6c1dced/attachment.bin>


More information about the openconnect-devel mailing list