tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp (2.6.2.29.2 nil/nil); wrong-type-argument "stringp #[0 \\300\\


From: Michael Albinus
Subject: Re: tramp (2.6.2.29.2 nil/nil); wrong-type-argument "stringp #[0 \\300\\207 [my actual password.."
Date: Wed, 12 Jun 2024 10:22:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Ethan Glasser-Camp <ethan.glasser.camp@gmail.com> writes:

> Hi emacs/tramp developers! Thank you for your efforts on tramp!

Hi Ethan,

> Today I updated emacs to 29.2 and I noticed something strange when I
> tried to use tramp to access files through the sudo method. This might
> turn out to be user error but I investigated it a little bit and I
> wanted to report what I found.

Thanks for the detailed report!

> I also tried turning on tramp-verbose to 10, which made emacs loop. (I
> think global-flycheck-mode was running on the tramp debug buffers and
> bringing emacs to its knees somehow.) However, it also produced a
> bunch of backtraces including an error like "Wrong type argument:
> stringp, #[0 "\300\207" ["..."]", where what was inside the ... was my
> actual user account password. This was kind of alarming, both because
> of the obscurity of the error and because I didn't expect the program
> to have access to my login password.

That error has given me a clue what happened :-)

> - This :secret value is a byte-compiled function, but the
> byte-compiled function does not return a string when called --
> instead, it returns a second byte-compiled function (which, when
> called, would return a string).

And this is indeed the problem, in auth-info-password. It expects a
string or a function from the search, and if it is a function, it calls
it and expects the password string then.

However: in the "secrets:Login" case, this could be a *cascaded*
function. So you must call it again and again, until it returns a
string.

Tramp did know this trap, and has provided a proper compatibility
function tramp-compat-auth-info-password. But when auth-info-password
exists, as it is the case in Emacs 29, this original function is called
with this error for passwords handled by the "secrets:Login" backend.

I have pushed the appended patch to the emacs-29[*] branch of Emacs
git. Could you pls apply it to your Emacs 29.2, and check whether it
works?

[*]: The recent Emacs release is 29.3. Honestly, I don't expect that
there will be an Emacs 29.4; likely the next release witll be 30.1. But
anyway, the patch will be contained there, whatever release it is.

> Thanks!
>
> Ethan

Best regards, Michael.

Attachment: txtUOf2ZgnAYZ.txt
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]