unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64807: 30.0.50; Editing files using sudo with fprintd hangs
@ 2023-07-23 16:28 Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-07-23 17:21 ` Michael Albinus
       [not found] ` <handler.64807.D64807.169493471128129.notifdone@debbugs.gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-07-23 16:28 UTC (permalink / raw)
  To: 64807; +Cc: Michael Albinus


Hi Emacs (and Michael, forgive me if this isn't relevant for you)

I'm using Ubuntu on a thinkpad with fingerprint scanner, and have
enabled it to be used when sudo is invoked, setting it in pam.d. Fprintd
is the program (I believe) that checks the fingerprint.

To make the issue a little clearer, I'll show an example that works like
intended in Emacs, and the one that does not.

Both

This works:
1. M-x eshell
2. type "sudo ls" then RET
3. observe that eshell prompts:
  "Place your finger on the fingerprint reader"
4. If fingerprint is wrong or you wait for some period (10 seconds I
believe) it falls back to normal.

See example prompt:

```
$ sudo ls
Place your finger on the fingerprint reader
Cargo.lock  Cargo.toml	src  target
$ sudo ls
Place your finger on the fingerprint reader
Verification timed out
[sudo] password for theodor: 
Cargo.lock  Cargo.toml	src  target
```

This doesn't work as intended:
1. C-x C-f /sudo:Theodor:/ RET
2. Observe that Emacs appears to be hanging
  - the cursor is now spinning, and "C-x o" and friends doesn't work
3. Scan fingerprint
  - all is ok
4. Wait for timeout
  - enter password
  - all is ok

So to sum up - in the eshell case we get some indication to scan the
fingerprint, in the sudo/tramp case we don't. Everything works as it
should, in that verification passes, but the UI is confusing, and it
appears to hang for other commands. C-g works.

Is there some way for Emacs to prompt for the fingerprint to be scanned,
and not to freeze up?

Let me know if I need to provide more information :)

Thanks,
Theo






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#64807: 30.0.50; Editing files using sudo with fprintd hangs
  2023-07-23 16:28 bug#64807: 30.0.50; Editing files using sudo with fprintd hangs Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-07-23 17:21 ` Michael Albinus
  2023-08-28 11:00   ` Michael Albinus
       [not found] ` <handler.64807.D64807.169493471128129.notifdone@debbugs.gnu.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Albinus @ 2023-07-23 17:21 UTC (permalink / raw)
  To: Theodor Thornhill; +Cc: 64807

Theodor Thornhill <theo@thornhill.no> writes:

> Hi Emacs (and Michael, forgive me if this isn't relevant for you)

Hi Theodor,

> I'm using Ubuntu on a thinkpad with fingerprint scanner, and have
> enabled it to be used when sudo is invoked, setting it in pam.d. Fprintd
> is the program (I believe) that checks the fingerprint.
>
> Is there some way for Emacs to prompt for the fingerprint to be scanned,
> and not to freeze up?

Tramp has support for 2FA security. Please add the fingerprint prompt to
the user option tramp-security-key-confirm-regexp. If there is a second
message, telling you that the security key (your finger :-) has been
confirmed, add this message to the user option
tramp-security-key-confirmed-regexp.

> Let me know if I need to provide more information :)

If it doesn't work, send me Tramp traces (tramp-verbose 6 shall be sufficient).

> Thanks,
> Theo

Best regards, Michael.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#64807: 30.0.50; Editing files using sudo with fprintd hangs
  2023-07-23 17:21 ` Michael Albinus
@ 2023-08-28 11:00   ` Michael Albinus
  2023-09-17  7:11     ` Michael Albinus
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Albinus @ 2023-08-28 11:00 UTC (permalink / raw)
  To: Theodor Thornhill; +Cc: 64807

Michael Albinus <michael.albinus@gmx.de> writes:

Hi Theodor,

>> I'm using Ubuntu on a thinkpad with fingerprint scanner, and have
>> enabled it to be used when sudo is invoked, setting it in pam.d. Fprintd
>> is the program (I believe) that checks the fingerprint.
>>
>> Is there some way for Emacs to prompt for the fingerprint to be scanned,
>> and not to freeze up?
>
> Tramp has support for 2FA security. Please add the fingerprint prompt to
> the user option tramp-security-key-confirm-regexp. If there is a second
> message, telling you that the security key (your finger :-) has been
> confirmed, add this message to the user option
> tramp-security-key-confirmed-regexp.

I don't know whether this has worked for you. Could you pls tell?

And in case it works: Which message have you added to
tramp-security-key-confirm-regexp? Something I could add to Tramp proper?

>> Thanks,
>> Theo

Best regards, Michael.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#64807: 30.0.50; Editing files using sudo with fprintd hangs
  2023-08-28 11:00   ` Michael Albinus
@ 2023-09-17  7:11     ` Michael Albinus
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Albinus @ 2023-09-17  7:11 UTC (permalink / raw)
  To: Theodor Thornhill; +Cc: 64807-done

Michael Albinus <michael.albinus@gmx.de> writes:

Hi Theodor,

>>> I'm using Ubuntu on a thinkpad with fingerprint scanner, and have
>>> enabled it to be used when sudo is invoked, setting it in pam.d. Fprintd
>>> is the program (I believe) that checks the fingerprint.
>>>
>>> Is there some way for Emacs to prompt for the fingerprint to be scanned,
>>> and not to freeze up?
>>
>> Tramp has support for 2FA security. Please add the fingerprint prompt to
>> the user option tramp-security-key-confirm-regexp. If there is a second
>> message, telling you that the security key (your finger :-) has been
>> confirmed, add this message to the user option
>> tramp-security-key-confirmed-regexp.
>
> I don't know whether this has worked for you. Could you pls tell?
>
> And in case it works: Which message have you added to
> tramp-security-key-confirm-regexp? Something I could add to Tramp proper?

No further comment, so I'm assuming it works. Closing the bug.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#64807: closed (Re: bug#64807: 30.0.50; Editing files using sudo with fprintd hangs)
       [not found] ` <handler.64807.D64807.169493471128129.notifdone@debbugs.gnu.org>
@ 2023-09-17  8:19   ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 5+ messages in thread
From: Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-17  8:19 UTC (permalink / raw)
  To: 64807

[-- Attachment #1: Type: text/html, Size: 510 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-09-17  8:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-23 16:28 bug#64807: 30.0.50; Editing files using sudo with fprintd hangs Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-23 17:21 ` Michael Albinus
2023-08-28 11:00   ` Michael Albinus
2023-09-17  7:11     ` Michael Albinus
     [not found] ` <handler.64807.D64807.169493471128129.notifdone@debbugs.gnu.org>
2023-09-17  8:19   ` bug#64807: closed (Re: bug#64807: 30.0.50; Editing files using sudo with fprintd hangs) Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).