From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Kirill A. Korinsky" Newsgroups: gmane.emacs.bugs Subject: bug#68376: 30.0.50; auth-source-search doesn't support numeric port on macOS Date: Thu, 11 Jan 2024 01:57:21 +0100 Message-ID: <2DF5150B-0710-4417-ADDD-BBFD449A4DBB@korins.ky> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\)) Content-Type: multipart/signed; boundary="Apple-Mail=_D3EAC303-4345-4E29-AAC1-5E99306FB6B8"; protocol="application/pgp-signature"; micalg=pgp-sha512 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32128"; mail-complaints-to="usenet@ciao.gmane.io" To: 68376@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 11 01:58:31 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rNjOx-0008BF-85 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Jan 2024 01:58:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNjOZ-0006Q5-NF; Wed, 10 Jan 2024 19:58:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNjOW-0006Pu-6M for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 19:58:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNjOV-0008WF-Mb for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 19:58:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rNjOU-00054e-2p for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 19:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Kirill A. Korinsky" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jan 2024 00:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68376 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.170493466319473 (code B ref -1); Thu, 11 Jan 2024 00:58:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Jan 2024 00:57:43 +0000 Original-Received: from localhost ([127.0.0.1]:43590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNjOA-00053z-PP for submit@debbugs.gnu.org; Wed, 10 Jan 2024 19:57:43 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:54474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNjO9-00053g-9A for submit@debbugs.gnu.org; Wed, 10 Jan 2024 19:57:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNjO2-0006L4-Qj for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 19:57:34 -0500 Original-Received: from mx1.catap.net ([162.55.82.72]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNjNz-0008Dk-E4 for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 19:57:33 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; s=20231225_mx1_rsa; bh=6YDog 1p7dyMiXjJpVuambDEcmMU=; h=to:subject:date:from; d=korins.ky; b=wKLG1U 8gdOPXRsRioWJhswejdyccepnZE47nDyX1iiorghNYqZdkntzt21ayKtSTotgiHh2N8rJd jKw4qjduBXFdFNytr3oJgsRsX95H87mVeX4YDHOmiHHy7H2flnIQpnD+ec0PLF2421WOMe sx85KM/FaOO0rpJ3pzQPlySmq1pr24oqe39M4bqiki7GgKK+4Y3Wgg35Jurbudy+jUeMHv FQCK7Z2XJYw3djZnJyrZzwhbY2TMNSuhwYvIETySuR9KZMh8uA22Z7upFBuWlvrB39lw2X osalNjyFcQzyB7VB7hovRieLgNxzzClmgVcOhDwF3TqEnOTWL7dakvew== Original-Received: by mx1.catap.net (OpenSMTPD) with ESMTPSA id d355d33e (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Thu, 11 Jan 2024 01:57:23 +0100 (CET) X-Mailer: Apple Mail (2.3696.120.41.1.4) Received-SPF: pass client-ip=162.55.82.72; envelope-from=kirill@korins.ky; helo=mx1.catap.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277854 Archived-At: --Apple-Mail=_D3EAC303-4345-4E29-AAC1-5E99306FB6B8 Content-Type: multipart/alternative; boundary="Apple-Mail=_4928B066-D0C4-4B06-AA2B-90AED2F96906" --Apple-Mail=_4928B066-D0C4-4B06-AA2B-90AED2F96906 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Greeting, I'd like to share a bug with simple reproducer: (auth-source-search :host "some.host" :port "123" :user "user") (auth-source-search :host "some.host" :port 123 :user "user") The first line works as expected, and the second one fails as: Debugger entered--Lisp error: (wrong-type-argument stringp 123) call-process("/usr/bin/security" nil t nil "find-generic-password" = "-g" "-c" "some.host" "-a" "user" "-s" 123) auth-source-macos-keychain-search-items("default" = macos-keychain-generic 1 "some.host" 123 "user" :type = macos-keychain-generic :user "user") apply(auth-source-macos-keychain-search-items "default" = macos-keychain-generic 1 "some.host" 123 "user" (:type = macos-keychain-generic :user "user")) auth-source-macos-keychain-search(:backend # :type macos-keychain-generic :max 1 = :require nil :create nil :delete nil :host "some.host" :port 123 :user = "user") auth-source-search-backends((# # # #) (:host "some.host" :port 123 :user = "user") 1 nil nil nil) auth-source-search(:host "some.host" :port 123 :user "user") eval((auth-source-search :host "some.host" :port 123 :user "user") = nil) elisp--eval-last-sexp(nil) eval-last-sexp(nil) funcall-interactively(eval-last-sexp nil) command-execute(eval-last-sexp) on In GNU Emacs 30.0.50 (build 1, x86_64-apple-darwin21.6.0, NS appkit-2113.60 Version 12.7.1 (Build 21G920)) of 2024-01-10 built on Kirills-MBP.sa31-home.catap.net Windowing system distributor 'Apple', version 10.3.2113 System Description: macOS 12.7.1 Configured using: 'configure --prefix=3D/opt/local --disable-silent-rules --without-dbus --without-gconf --without-libotf --without-m17n-flt --with-libgmp --with-gnutls --with-json --with-xml2 --with-modules --with-sqlite3 --with-webp --infodir /opt/local/share/info/emacs --with-ns --with-lcms2 --without-harfbuzz --without-xaw3d --with-imagemagick --with-rsvg --with-native-compilation=3Daot --with-tree-sitter 'CFLAGS=3D-pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch x86_64' 'CPPFLAGS=3D-I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk' 'LDFLAGS=3D-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-rpath /opt/local/lib/gcc13 -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch x86_64'' which was build from = https://github.com/emacs-mirror/emacs/commit/d9462e24a967e32d550ee886b5150= f0cc78358f6 = -- wbr, Kirill --Apple-Mail=_4928B066-D0C4-4B06-AA2B-90AED2F96906 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
Greeting,

I'd like to share a bug with simple = reproducer:

(auth-source-search :host "some.host" :port "123" :user = "user")
(auth-source-search :host "some.host" :port = 123 :user "user")

The first line works as expected, and the second one fails = as:

Debugger = entered--Lisp error: (wrong-type-argument stringp 123)
  call-process("/usr/bin/security" nil t nil = "find-generic-password" "-g" "-c" "some.host" "-a" "user" "-s" = 123)
  = auth-source-macos-keychain-search-items("default" macos-keychain-generic = 1 "some.host" 123 "user" :type macos-keychain-generic :user = "user")
  = apply(auth-source-macos-keychain-search-items "default" = macos-keychain-generic 1 "some.host" 123 "user" (:type = macos-keychain-generic :user "user"))
  = auth-source-macos-keychain-search(:backend #<auth-source-backend = auth-source-backend-1ff08463df92> :type macos-keychain-generic :max 1 = :require nil :create nil :delete nil :host "some.host" :port 123 :user = "user")
  = auth-source-search-backends((#<auth-source-backend = auth-source-backend-1ff08463df92> #<auth-source-backend = auth-source-backend-1ff0887f79e6> #<auth-source-backend = auth-source-backend-1ff07046d5fe> #<auth-source-backend = auth-source-backend-1ff070457074>) (:host "some.host" :port 123 :user = "user") 1 nil nil nil)
  = auth-source-search(:host "some.host" :port 123 :user "user")
  eval((auth-source-search :host "some.host" :port 123 = :user "user") nil)
  = elisp--eval-last-sexp(nil)
  = eval-last-sexp(nil)
  = funcall-interactively(eval-last-sexp nil)
  = command-execute(eval-last-sexp)

on

In GNU Emacs 30.0.50 (build 1, = x86_64-apple-darwin21.6.0, NS
 appkit-2113.60 = Version 12.7.1 (Build 21G920)) of 2024-01-10 built on
Windowing system distributor 'Apple', version = 10.3.2113
System Description:  macOS = 12.7.1

Configured using:
 'configure = --prefix=3D/opt/local --disable-silent-rules --without-dbus
 --without-gconf --without-libotf --without-m17n-flt = --with-libgmp
 --with-gnutls --with-json = --with-xml2 --with-modules --with-sqlite3
 --with-webp --infodir /opt/local/share/info/emacs = --with-ns
 --with-lcms2 --without-harfbuzz = --without-xaw3d --with-imagemagick
 --with-rsvg = --with-native-compilation=3Daot --with-tree-sitter
 'CFLAGS=3D-pipe -Os
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX1= 2.sdk -arch
 x86_64' = 'CPPFLAGS=3D-I/opt/local/include
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX1= 2.sdk'
 'LDFLAGS=3D-L/opt/local/lib = -Wl,-headerpad_max_install_names -Wl,-rpath
 /opt/local/lib/gcc13
 -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/= MacOSX12.sdk
 -arch x86_64''


-- 
wbr, Kirill

= --Apple-Mail=_4928B066-D0C4-4B06-AA2B-90AED2F96906-- --Apple-Mail=_D3EAC303-4345-4E29-AAC1-5E99306FB6B8 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE3/KLNtcfWfLw7JxqmNjZhndZIm4FAmWfPPIACgkQmNjZhndZ Im67rg/+K88bR0FjG/G+qxBg+WNgu8kSjMJp/NF5tY7SfkcCACGhkRVKAufzGBdU Mn2r0g9gI/faOA7ot3l7RsrE6a0ZM+Pc0zfkAleFl1gX6iDA//C/YweOLPCMvG1n qOl9Iz/kd21k0jLm0Va30L+Pq7koyDEkuFLd9WTuNYv+1JwyD2jFeYPfmug/Mf/F TdB7S/Wm+AHy9MX/hhvKXmTqRG/MygHZNF6lI+ZBPuSb51zuSMFKd98E835pb1ff bGMcZoOSkUUBlytBdvo5WiR5gSGaWCIDhi+Yl9SjOjm0pqruR2DFDvlMhvDvjAa0 SU3j5XSNq0JV/rOiYwYuaSLtLNvsWy1htB7cdKi7emdZWyG4NQir22GolHwUJKZC zgYAAauExuJtgf3SuAKcvv9ihUS6Qqs1nst5OlJfrbJisIzAHe1zhLF3ylc/rODE xRyjzedyG8GXJ9ORcmNgkdkEbtK9K/oCsR26U77oYKt0nQ+Zrn4QQOg9kPqNCLpL wXzuZ6nEGay7BcL3mv6BvdYuN0hRZNNz5GSnIEZ5GMHsOo7wYb1T3mA2k57v1fa1 144L1/+sjL3bsXMHK69Nx0VZJEnbIefwbZW1zv/fiXT8s47bvMUp6TpOlK9Tt604 7ALB95W8Xw05HTuv3JixSaDGRJfjF2rcA3XPNNlgDa/4+ZJ4/lo= =ixFH -----END PGP SIGNATURE----- --Apple-Mail=_D3EAC303-4345-4E29-AAC1-5E99306FB6B8--