GNU bug report logs - #67937
30.0.50; auth-source-pass relies on epa-file being enabled

Previous Next

Package: emacs;

Reported by: Arsen Arsenović <arsen <at> aarsen.me>

Date: Wed, 20 Dec 2023 17:02:02 UTC

Severity: normal

Found in version 30.0.50

Full log


Message #74 received at 67937 <at> debbugs.gnu.org (full text, mbox):

From: Arsen Arsenović <arsen <at> aarsen.me>
To: "J.P." <jp <at> neverwas.me>
Cc: Damien Cassou <damien <at> cassou.me>, Eli Zaretskii <eliz <at> gnu.org>,
 67937 <at> debbugs.gnu.org, Michael Albinus <michael.albinus <at> gmx.de>
Subject: Re: bug#67937: 30.0.50; auth-source-pass relies on epa-file being
 enabled
Date: Sun, 24 Dec 2023 11:25:24 +0100
[Message part 1 (text/plain, inline)]
Hi J.P,

"J.P." <jp <at> neverwas.me> writes:

> Arsen Arsenović <arsen <at> aarsen.me> writes:
>
>> This patch/bug report addresses a real problem that exists independently
>> of what triggered it in my case.
>>
>>> My gut feeling tells me that this could be the real problem, and we
>>> need to solve this instead of bypassing the problem with another
>>> patch, which could introduce further problems.
>>
>> Your gut's nearly certainly right here :-)  I am still hunting for the
>> cause of that issue.
>
> Perhaps it couldn't hurt to get that somewhat sorted before modifying
> `auth-source-pass--read-entry'.

I firmly believe that these are two separate bugs, one of which
triggered the other.  The reason for that is because I can reproduce
this bug by simply running 'epa-file-disable', without invoking the
original bug that revealed it to me.

>> Regardless, what I said initially holds true ultimately: either epa-file
>> should not be relied on, or a-s-p should ensure it is present.  I
>> gravitate towards the former, as it reduces the complexity of getting a
>> password-store entry.
>>
>>> Hunting for this problem I recommend to use
>>> (debug-on-variable-change 'file-name-handler-alist)
>>
>> That is too verbose.  The following appears to work well, though:
>>
>> (add-variable-watcher
>>  'file-name-handler-alist
>>  (lambda (symbol newval operation where)
>>    (cl-flet ((hefh (val)
>> 	       (seq-some (lambda (x) (equal (cdr x) 'epa-file-handler))
>> 			 val)))
>>      (let ((hb (hefh file-name-handler-alist))
>> 	   (ha (hefh newval)))
>>        (cond
>> 	((and hb (not ha))
>> 	 (debug--implement-debug-watch symbol newval operation where))
>> 	((and (not hb) ha)
>> 	 (message "epa-file added")))))))
>
> I can't imagine
>
>   (rassq 'epa-file-handler val)
>
> differing from
>
>   (car (memq epa-file-handler val)) ; w/o the quote
>
> But if it somehow does, that could provide an insight into the cause as
> well. Just a thought.

Interesting, I didn't realize epa-file-handler is also a variable
besides just being a function.  I also didn't know rassq exists!  Goes
to show how novice I am in elisp :-)

I will clean up that code above.

You're right WRT those possibly different being interesting, I'll try to
catch that, too.

Thanks, have a lovely day!
--
Arsen Arsenović
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 206 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.