Summary: | Asks for OpenPGP passphrase multiple times | ||||||
---|---|---|---|---|---|---|---|
Product: | Sisyphus | Reporter: | Andrey Rahmatullin <wrar> | ||||
Component: | gnupg2 | Assignee: | Alexey Gladkov <legion> | ||||
Status: | CLOSED FIXED | QA Contact: | qa-sisyphus | ||||
Severity: | normal | ||||||
Priority: | P2 | CC: | legion, manowar, mike, rider, vvk | ||||
Version: | unstable | ||||||
Hardware: | all | ||||||
OS: | Linux | ||||||
Attachments: |
|
Description
Andrey Rahmatullin
2007-06-04 19:59:04 MSD
[22:00:54] <textshell> wRAR: most likely because you use gpg-agent and it doesn't handle that case correctly. [22:02:40] <textshell> with concurrent gpg invokations gpg-agent is a bit stupid. [22:04:16] <wRAR> it is said that 0.10 works OK [22:04:33] <textshell> right 0.10 doesn't use concurrent gpg invokations. Андрей, попробуйте пожалуйста версию 0.11-svn20070605 Не помогло, конечно же. Да, кстати. 18464 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 29 --command-fd 26 --always-trust --verify - -&24 18465 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 37 --command-fd 34 --always-trust --verify - -&32 18466 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 45 --command-fd 42 --always-trust --verify - -&40 18467 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 53 --command-fd 50 --always-trust --verify - -&48 18473 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 82 --command-fd 79 --always-trust --verify - -&76 18479 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 90 --command-fd 87 --always-trust --verify - -&85 23557 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 33 --command-fd 26 --always-trust --verify - -&24 23560 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 61 --command-fd 53 --always-trust --verify - -&42 23561 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 86 --command-fd 79 --always-trust --verify - -&76 23565 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 95 --command-fd 45 --always-trust --verify - -&26 23566 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 117 --command-fd 114 --always-trust --verify - -&112 23569 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 125 --command-fd 122 --always-trust --verify - -&120 8344 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 76 --command-fd 49 --always-trust --verify - -&42 8345 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 113 --command-fd 96 --always-trust --verify - -&86 8358 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 149 --command-fd 143 --always-trust --verify - -&125 8359 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 157 --command-fd 154 --always-trust --verify - -&152 6142 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 136 --command-fd 113 --always-trust --verify - -&95 6143 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 158 --command-fd 153 --always-trust --verify - -&149 10373 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 153 --command-fd 136 --always-trust --verify - -&96 10378 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 178 --command-fd 170 --always-trust --verify - -&164 10379 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 187 --command-fd 184 --always-trust --verify - -&182 10380 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 195 --command-fd 192 --always-trust --verify - -&190 18059 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 183 --command-fd 170 --always-trust --verify - -&164 18060 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 197 --command-fd 192 --always-trust --verify - -&190 18061 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 220 --command-fd 212 --always-trust --verify - -&206 18062 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 229 --command-fd 226 --always-trust --verify - -&224 18065 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 252 --command-fd 234 --always-trust --verify - -&230 18066 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 263 --command-fd 260 --always-trust --verify - -&258 10467 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 197 --command-fd 190 --always-trust --verify - -&170 10468 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 229 --command-fd 224 --always-trust --verify - -&212 10471 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 253 --command-fd 241 --always-trust --verify - -&234 20154 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 229 --command-fd 212 --always-trust --verify - -&190 20155 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 265 --command-fd 258 --always-trust --verify - -&241 26215 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 279 --command-fd 258 --always-trust --verify - -&241 26216 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 301 --command-fd 297 --always-trust --verify - -&294 26217 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 309 --command-fd 306 --always-trust --verify - -&304 26241 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 329 --command-fd 314 --always-trust --verify - -&310 26244 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 332 --command-fd 321 --always-trust --verify - -&309 26245 ? SL 0:00 gpg --no-tty --enable-special-filenames --status-fd 345 --command-fd 342 --always-trust --verify - -&340 До перезапуска psi эти процессы были его детьми. с gpg в версии psi0.11-0.11-alt2svn20070605 точно нет этих проблем. Я версию обновлял только из-за утечки процессов. Как обстоят сейчас дела с запросом пароля несколько раз ? psi0.11-0.11-alt2svn20070917 - так же Мне кажется что стоит это повесить в mainstream, хотя его мнение понятно, но всё-же. (как доедет) Проверяй psi0.12, 0.11 уже всё. Ну вроде ага. Не ага. Если грохнуть gpg-agent, psi выдаёт (1 раз) какое-то своё (?) окошко, не похожее на pinentry. Если gpg-agent есть, выдаётся 2 раза. psi-0.13-alt0.git3.57c98f2 - всё то же самое. Перевешиваю на gnupg2. Кусок кода с комментариями из gpg-agent'а говорит о том, что пароль должен спрашиваться один раз, даже если за ним приходит два одновременных запроса. retry: pw = agent_get_cache (hexgrip, cache_mode, &cache_marker); if (pw) { rc = agent_unprotect (*keybuf, pw, NULL, &result, &resultlen); agent_unlock_cache_entry (&cache_marker); if (!rc) { xfree (*keybuf); *keybuf = result; return 0; } rc = 0; } /* If the pinentry is currently in use, we wait up to 60 seconds for it to close and check the cache again. This solves a common situation where several requests for unprotecting a key have been made but the user is still entering the passphrase for the first request. Because all requests to agent_askpin are serialized they would then pop up one after the other to request the passphrase - despite that the user has already entered it and is then available in the cache. This implementation is not race free but in the worst case the user has to enter the passphrase only once more. */ if (pinentry_active_p (ctrl, 0)) { /* Active - wait */ if (!pinentry_active_p (ctrl, 60)) { /* We need to give the other thread a chance to actually put it into the cache. */ pth_sleep (1);. goto retry; } /* Timeout - better call pinentry now the plain way. */ } } Created attachment 3347 [details]
gnupg-2.0.10-agent-fix-password-requiest.patch
Вот такой небольшой патч (копи-паст из другого куска gpg-agent'а) - решает проблему.
gnupg2-2.0.11-alt1 fixed Помогло, подтверждаю. Снова три раза спросило :-/ Следующий раз не повторилось, как и следовало ожидать. Не знаю, как повторить. после неактивности ? сам на такое нарывался, пока не понимаю в чём проблема (ну явно в gpg-agent) (В ответ на комментарий №20) > после неактивности ? Ну я сильно не сразу после вывода диалога пароль ввёл, если ты об этом. да да, именно об этом. Нужно попробовать снова и понаблюдать - есть подозрение, что через 1 минуту будет вылезать новый запрос пароля, несмотря на наличие старого. нет, через 1, 2, 3 и т.д. минут - не вылез. В общем, Андрей... ты уже знаешь где смотреть - если сможешь отловить / исправить - пиши. Теперь это время от времени вылезает.. например, если оставить psi включённой и на часок-другой отойти - то вылезет несколько окон запроса пароля от pinentry. Как ловить - я пока не знаю, любые идеи приветствуются. Отлично повторяется, если заставить psi показать pinentry и хотя бы минут 10 не отвечать. Подождал ... не воспроизвелось ;( Точнее так. <тут было про запуск пси при старте системы, но я это стёр, т.к. засомневался> Выходим в онлайн, ждём отсыхания пассфразы в агенте, отходим от машины так, чтобы вызвался автостатус (вместо этого наверно можно и руками его переключить, но я этим не пользуюсь, потому не сталкивался). Возвращаемся - висит один pinentry, после ввода в него пассфразы авылезает следующий. При этом висит кучка процессов gpg (у меня было 6 после ввода где-то 2-3 пассфраз из ~5). Это стандартный алгоритм "пошёл пить чай - вернулся". Я так делаю постоянно - не вылезает два pinentry. нужно засекать время. Видимо, таймаут должен быть достаточно большим.. Просьба протестировать текущую версию (gnupg2 >= 2.0.14-alt6); если воспроизведётся -- напишите, я тогда посмотрю. Ну вообще последнее время после автостатуса вылезает окно pinentry и под ним окно psi, и после ввода пассфразы новых окон не вылезает. Это на alt5. Ещё попроверяю и можно будет закрывать. Not reproducible anymore with gnupg2-2.0.14-alt6 psi-0.14-alt3 |