GNU bug report logs - #64977
29.1; `auth-source-macos-keychain-search' handles :user key incorrectly

Previous Next

Package: emacs;

Reported by: LdBeth <andpuke <at> foxmail.com>

Date: Mon, 31 Jul 2023 15:48:01 UTC

Severity: normal

Found in version 29.1

Fixed in version 30.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: LdBeth <andpuke <at> foxmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: LdBeth <andpuke <at> foxmail.com>, 64977 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#64977: 29.1; `auth-source-macos-keychain-search' handles :user key incorrectly
Date: Sat, 12 Aug 2023 14:02:33 -0500
[Message part 1 (text/plain, inline)]
Sure. I have made the test. I also found a issue not covered in my
previous patch, that if the protocol is longer than 4 characters it
should be truncated. Please have a look at them.

ldb

[patch1 (text/plain, attachment)]
[Message part 3 (text/plain, inline)]

[patch2 (text/plain, attachment)]
[Message part 5 (text/plain, inline)]

>>>>> In <87r0o8z1sc.fsf <at> gmx.de> 
>>>>>	Michael Albinus <michael.albinus <at> gmx.de> wrote:
> LdBeth <andpuke <at> foxmail.com> writes:

> Hi,

>> I think it is possible to use cl-left to redefine
>> `auth-source-macos-keychain-search-items' to avoid calling external
>> security command and just check the argument passed to
>> `call-process'.
>>
>> Something like:
>>
>> (cl-letf (((symbol-function 'call-process) (lambda (&rest r) (print r))))
>>   (auth-source-search :user "ldb" :port "irc"))
>>
>> ("/usr/bin/security" nil t nil "find-internet-password" "-g" "-a" "ldb" "-r" "irc ")
>>
>> ("/usr/bin/security" nil t nil "find-generic-password" "-g" "-a" "ldb" "-s" "irc")

> Yes, like this. And in the lambda function, you could check the expected
> arguments of the "/usr/bin/security" call by `should' and friends.

> Would you like to add such test(s)? This would give us more confidence
> that nothing is or will be broken, because people using macOS would test
> this by default when running "make check", even if they don't care the
> macOS keychain.

>> ldb

> Best regards, Michael.

This bug report was last modified 1 year and 337 days ago.

Previous Next


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