N Winkel <nw1...@outlook.com> writes:

> Hi Michael,

Hi Neri,

> This time around the variable `tramp-use-fingerprint` was respected
> and the fingerprint auth was cancelled immediately.

Good. So the first of three use cases works. This is also seen in
1-nofprintPass.log, where the password prompt apüpears shortly after the
finferprint reader prompt:

--8<---------------cut here---------------start------------->8---
16:42:33.376427 tramp-accept-process-output (10) # *tramp/sudo root@archlinux* 
run t
Place your finger on the fingerprint reader
16:42:33.377212 tramp-process-one-action (5) # Looking for regexp "\(\(?:Place 
your \(?:\(?:finger o\(?:n the reader agai\)?\|\(?:left \(?:index 
finger\|little finger\|middle finger\|ring finger\|thumb\)\|right \(?:index 
finger\|little finger\|middle finger\|ring finger\|thumb\)\) o\)n\)\|Remove 
your finger, and try swiping your finger again\|Swipe \(?:was too short, try 
again\|your \(?:finger a\(?:cross\|gain\)\|\(?:left \(?:index finger\|little 
finger\|middle finger\|ring finger\|thumb\)\|right \(?:index finger\|little 
finger\|middle finger\|ring finger\|thumb\)\) across\)\)\|Your finger was not 
centred, try swiping your finger again\).*[
]*\)\'" from remote shell
16:42:33.377342 tramp-process-one-action (5) # Call ‘tramp-action-fingerprint’
16:42:34.377959 tramp-accept-process-output (10) # *tramp/sudo root@archlinux* 
run nil
Place your finger on the fingerprint reader
Password: 
--8<---------------cut here---------------end--------------->8---

The regexp was detected, tramp-action-fingerprint was called, it
interrupted the process, and the password prompt appeared. This was
within 1 second, caused by the (sit-for 1 'nodisp) call I've added for
sanity. I'll comment it out, it should still work I believe.

>     But I suspectect, that fprintd writes "Place your finger on the
> fingerprint reader" as a whole line, including the final newline.

It did, as we see above.

> However this doesn't seem to have done the trick, the prompt still
> doesn't seem to be detected by the regexp.

The regexp works. Otherwise, tramp-action-fingerprint wasn't called. So
let's look at the other use cases. First, 1-fprintUsed.log:

--8<---------------cut here---------------start------------->8---
16:16:30.712125 tramp-accept-process-output (10) # *tramp/sudo root@archlinux* 
run t
Place your finger on the fingerprint reader
16:16:30.712488 tramp-process-one-action (5) # Looking for regexp "\(\(?:Place 
your \(?:\(?:finger o\(?:n the reader agai\)?\|\(?:left \(?:index 
finger\|little finger\|middle finger\|ring finger\|thumb\)\|right \(?:index 
finger\|little finger\|middle finger\|ring finger\|thumb\)\) o\)n\)\|Remove 
your finger, and try swiping your finger again\|Swipe \(?:was too short, try 
again\|your \(?:finger a\(?:cross\|gain\)\|\(?:left \(?:index finger\|little 
finger\|middle finger\|ring finger\|thumb\)\|right \(?:index finger\|little 
finger\|middle finger\|ring finger\|thumb\)\) across\)\)\|Your finger was not 
centred, try swiping your finger again\).*[
16:16:30.712552 tramp-process-one-action (5) # Call ‘tramp-action-fingerprint’
16:16:30.712571 tramp-action-show-message (6) # 
Place your finger on the fingerprint reader

16:16:34.069284 tramp-process-one-action (5) # Looking for regexp 
"\(\(?:^\|\)[^]
#-%>]*#?[]#-%>][[:blank:]]*\)\'" from remote shell
16:16:34.069358 tramp-process-one-action (5) # Call ‘tramp-action-succeed’
16:16:34.069412 tramp-process-actions (6) # 
Place your finger on the fingerprint reader
#$ 
--8<---------------cut here---------------end--------------->8---

It looks proper. First, the string "Place your finger on the fingerprint
reader" was detected by the regexp. tramp-action-fingerprint was called,
which has invoked tramp-action-show-message, which should have shown the
message in the echo area. Did it?

Some few seconds later, you have authorized with your finger, and we see
the shell prompt "#$". This is detected, and the call of
tramp-action-succeed finishes the initial conversation.

Now the third case, 1-fprintTimeoutPass.log:

--8<---------------cut here---------------start------------->8---
16:35:02.288110 tramp-accept-process-output (10) # *tramp/sudo root@archlinux* 
run t
Place your finger on the fingerprint reader
16:35:02.288499 tramp-process-one-action (5) # Looking for regexp "\(\(?:Place 
your \(?:\(?:finger o\(?:n the reader agai\)?\|\(?:left \(?:index 
finger\|little finger\|middle finger\|ring finger\|thumb\)\|right \(?:index 
finger\|little finger\|middle finger\|ring finger\|thumb\)\) o\)n\)\|Remove 
your finger, and try swiping your finger again\|Swipe \(?:was too short, try 
again\|your \(?:finger a\(?:cross\|gain\)\|\(?:left \(?:index finger\|little 
finger\|middle finger\|ring finger\|thumb\)\|right \(?:index finger\|little 
finger\|middle finger\|ring finger\|thumb\)\) across\)\)\|Your finger was not 
centred, try swiping your finger again\).*[
16:35:02.288560 tramp-process-one-action (5) # Call ‘tramp-action-fingerprint’
16:35:02.288577 tramp-action-show-message (6) # 
Place your finger on the fingerprint reader

16:35:32.352399 tramp-accept-process-output (10) # *tramp/sudo root@archlinux* 
run t
Verification timed out
Password: 
16:35:32.352883 tramp-process-one-action (5) # Looking for regexp 
"\(\(?:^.*\(\(?:adgangskode\|contrase\(?:\(?:ny\|ñ\)a\)\|decryption 
key\|encryption 
key\|geslo\|h\(?:\(?:asł\|esl\)o\)\|iphasiwedi\|jelszó\|l\(?:ozinka\|ösenord\)\|m\(?:ot
 de passe\|ật khẩu\)\|p\(?:a\(?:rola\|s\(?:ahitza\|s\(?: 
phrase\|code\|ord\|phrase\|wor[dt]\)\|vorto\)\)\|in\)\|s\(?:alasana\|enha\|laptažodis\)\|wachtwoord\|лозинка\|пароль\|ססמה\|كلمة
 السر\|गुप्तशब्द\|शब्दकूट\|গুপ্তশব্দ\|পাসওয়ার্ড\|ਪਾਸਵਰਡ\|પાસવર્ડ\|ପ୍ରବେଶ 
ସଙ୍କେତ\|கடவுச்சொல்\|సంకేతపదము\|ಗುಪ್ತಪದ\|അടയാളവാക്ക്\|රහස්පදය\|ពាក្យសម្ងាត់\|パスワード\|密[码碼]\|암호\)\).*[:៖︓﹕:]?[[:blank:]]*\)\)\'"
 from remote shell
16:35:32.353044 tramp-process-one-action (5) # Call ‘tramp-action-password’
16:35:32.353247 tramp-action-password (3) # Sending Password

16:35:38.499189 tramp-process-one-action (5) # Call ‘tramp-action-succeed’
16:35:38.499212 tramp-get-connection-property (7) # process-buffer nil; cache 
used: t
16:35:38.499231 tramp-process-actions (6) # 
Place your finger on the fingerprint reader
Verification timed out
Password: 
#$ 
--8<---------------cut here---------------end--------------->8---

This looks also OK. Tramp has detected the string "Place your finger on
the fingerprint reader" at 16:35:02, and via tramp-action-fingerprint /
tramp-action-show-message it should have shown you the message. Nothing
happens, and at 16:35:32 the message "Verification timed out" has
appeared, following by a password request. Tramp has detected this, and
sent the password. At 16:35:38, the shell prompt did appear (don't know
why it took 6 seconds, perhaps manual typing of the password.

So everything looks fine to me. The question remains: Did you see the
fingerprint prompt in the echo area in case 2 and 3?

> Best regards, Neri.

Best regards, Michael.

Reply via email to