GNU bug report logs - #38284
27.0.50; [PATCH] Make auth-source-pass-search understand port lists

Previous Next

Package: emacs;

Reported by: João Távora <joaotavora <at> gmail.com>

Date: Wed, 20 Nov 2019 00:22:05 UTC

Severity: normal

Tags: patch

Found in version 27.0.50

Fixed in version 27.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Damien Cassou <damien <at> cassou.me>
To: João Távora <joaotavora <at> gmail.com>, 38284 <at> debbugs.gnu.org
Cc: Nicolas Petton <nicolas <at> petton.fr>
Subject: bug#38284: 27.0.50; [PATCH] Make auth-source-pass-search understand port lists
Date: Thu, 21 Nov 2019 19:27:34 +0100
Hi João,

João Távora <joaotavora <at> gmail.com> writes:
> […] Eventually I came to this patch, which seems to do the right
> thing.


great job, thank you. Some feedback below.

>    (let ((domains (auth-source-pass--domains (split-string hostname "\\."))))
> -    (seq-mapcat (lambda (n)
> -                  (auth-source-pass--name-port-user-suffixes n user port))
> +    (seq-mapcat (lambda (d)


can you please rename "d" to "domain"?


> +                  (seq-mapcat
> +                   (lambda (p)


same for "p".


> +                     (auth-source-pass--name-port-user-suffixes d user p))
> +                   (if (listp port) port (list port))))
>                  domains)))


Can you please add a unit test covering this new use-case?

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill




This bug report was last modified 5 years and 116 days ago.

Previous Next


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