From unknown Fri Aug 15 04:05:27 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#64089 <64089@debbugs.gnu.org> To: bug#64089 <64089@debbugs.gnu.org> Subject: Status: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t Reply-To: bug#64089 <64089@debbugs.gnu.org> Date: Fri, 15 Aug 2025 11:05:27 +0000 retitle 64089 30.0.50; `ldap-search' errors out with `wrong-type-argument l= istp' when called WITHDN =3D=3D t reassign 64089 emacs submitter 64089 Jens Schmidt severity 64089 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 15 17:28:58 2023 Received: (at submit) by debbugs.gnu.org; 15 Jun 2023 21:28:58 +0000 Received: from localhost ([127.0.0.1]:48119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9uWY-0008KR-B1 for submit@debbugs.gnu.org; Thu, 15 Jun 2023 17:28:58 -0400 Received: from lists.gnu.org ([209.51.188.17]:36920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9uWW-0008KJ-RU for submit@debbugs.gnu.org; Thu, 15 Jun 2023 17:28:57 -0400 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 1q9uWU-0005kp-VL for bug-gnu-emacs@gnu.org; Thu, 15 Jun 2023 17:28:56 -0400 Received: from mr5.vodafonemail.de ([145.253.228.165]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9uWS-00035T-QS for bug-gnu-emacs@gnu.org; Thu, 15 Jun 2023 17:28:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1686864525; bh=B99pS5b6JhZU5hHM6TEBpWYwuUK4y/QYftZccq5Xroo=; h=Message-ID:Date:User-Agent:Content-Language:From:Subject:To: Content-Type:From; b=XRF+icMpzdR80FUsbSv8+K/msVlay0qJHSZ0mKEt1IOOiI8Ayl2xaxcPCn9Jyaudc PKqkxF89zVdzRs5QMjdSZohCyp6ydew329rUE5KjKTLWsVWD/+al5/EMj53WUq+K+9 i3mbKVKcW8gaakN97RUZq+oYs7+2nsoe/LKbsT8o= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr5.vodafonemail.de (Postfix) with ESMTPS id 4QhwQP42Ypz1yYW for ; Thu, 15 Jun 2023 21:28:45 +0000 (UTC) Received: from [192.168.178.41] (port-92-194-178-141.dynamic.as20676.net [92.194.178.141]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4QhwQK1TdyzHpxb for ; Thu, 15 Jun 2023 21:28:38 +0000 (UTC) Message-ID: Date: Thu, 15 Jun 2023 23:28:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: de-DE-frami, en-US From: Jens Schmidt Subject: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-purgate-type: clean X-purgate: clean X-purgate-size: 1142 X-purgate-ID: 155817::1686864521-CA7FDD81-AD902682/0/0 Received-SPF: pass client-ip=145.253.228.165; envelope-from=jschmidt4gnu@vodafonemail.de; helo=mr5.vodafonemail.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Start emacs -Q. Then: (require 'ldap) => ldap (setq ldap-host-parameters-alist '(("ldap://" . (auth simple base "dc=,dc=com")))) => (("ldap://" auth simple base "dc=,dc=com")) (ldap-search "(uid=)" "ldap://" '("mail")) => ((("mail" "@.com"))) (ldap-search "(uid=)" "ldap://" '("mail") nil t) Error stack: Debugger entered--Lisp error: (wrong-type-argument listp "dn: cn=,L=,DC=,DC=COM") ldap-decode-attribute("dn: cn=,L=,DC=,DC=COM") mapcar(ldap-decode-attribute ("dn: cn=,L=,DC=,DC=COM" ("mail" "@.com"))) Error cause is pretty obvious: Function `ldap-decode-attribute' expects a pair ("dn" "") and not a string "dn: " generated by the sexp `(setq dn (buffer-substring (point) (line-end-position)))' in `ldap-search-internal'. This bug is also present in Emacs 29. Patch available, will provide in next bug update. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 15 18:11:37 2023 Received: (at 64089) by debbugs.gnu.org; 15 Jun 2023 22:11:37 +0000 Received: from localhost ([127.0.0.1]:48154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9vBo-0003bg-Pl for submit@debbugs.gnu.org; Thu, 15 Jun 2023 18:11:37 -0400 Received: from mr6.vodafonemail.de ([145.253.228.166]:49852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9vBm-0003bR-Ew for 64089@debbugs.gnu.org; Thu, 15 Jun 2023 18:11:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1686867087; bh=tD9zbApAqLCze+oVleVgGnKDOizPI0X732EXe6ShXDA=; h=Content-Type:Message-ID:Date:User-Agent:From:Subject:To: References:Content-Language:In-Reply-To:From; b=NecyqdCfDTuiRfN0Kd7dsK2DwvzcIQbrUzicJwyZxOOFaFdzPUgI0+ApfbZEzYOfM RHwaMZjlp0F9S2Nu0K1C6ZyLgRRAn+Z28lbBjKsonwF9ze9NiYdwgnZziHtkfk+FpY a/CeE6QFYJT7RcLG8+LReLZ1jnAJVfMDYcbRVuTQ= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr6.vodafonemail.de (Postfix) with ESMTPS id 4QhxMg5YHvz1y3G for <64089@debbugs.gnu.org>; Thu, 15 Jun 2023 22:11:27 +0000 (UTC) Received: from [192.168.178.41] (port-92-194-178-141.dynamic.as20676.net [92.194.178.141]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4QhxMb2k4VzMkry for <64089@debbugs.gnu.org>; Thu, 15 Jun 2023 22:11:20 +0000 (UTC) Content-Type: multipart/mixed; boundary="------------lVF2QCPaCzi7XkmVAasEeVpd" Message-ID: Date: Fri, 16 Jun 2023 00:11:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 From: Jens Schmidt Subject: Re: bug#64089: Acknowledgement (30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t) To: 64089@debbugs.gnu.org References: Content-Language: de-DE-frami, en-US In-Reply-To: X-purgate-type: clean X-purgate: clean X-purgate-size: 3240 X-purgate-ID: 155817::1686867083-5AFFAEE7-088A4619/0/0 X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 64089 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) This is a multi-part message in MIME format. --------------lVF2QCPaCzi7XkmVAasEeVpd Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit With the following patch things work as expected: (ldap-search "(uid=)" "ldap://" '("mail") nil t) => ((("dn" "cn=,L=,DC=,DC=COM") ("mail" "@.com"))) I tried to make the patch as conservative as possible and intentionally do not check syntax of the dn line if its parsing is not required. --------------lVF2QCPaCzi7XkmVAasEeVpd Content-Type: text/x-patch; charset=UTF-8; name="0001-Fix-parsing-of-dn-line-if-WITHDN-is-non-nil.patch" Content-Disposition: attachment; filename="0001-Fix-parsing-of-dn-line-if-WITHDN-is-non-nil.patch" Content-Transfer-Encoding: base64 RnJvbSBhNjQ2ZjVhYTIzZjA1MWYxOTkxMDI4NmMxYmY5ZjQ1ODBhODU4ZjBmIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKZW5zIFNjaG1pZHQgPGpzY2htaWR0NGdudUB2b2Rh Zm9uZW1haWwuZGU+CkRhdGU6IEZyaSwgMTYgSnVuIDIwMjMgMDA6MDQ6MDQgKzAyMDAKU3Vi amVjdDogW1BBVENIXSBGaXggcGFyc2luZyBvZiBkbiBsaW5lIGlmIFdJVEhETiBpcyBub24t bmlsCgpGdW5jdGlvbiBgbGRhcC1zZWFyY2gnIGVycm9ycyBvdXQgd2l0aCBgd3JvbmctdHlw ZS1hcmd1bWVudCBsaXN0cCcKd2hlbiBjYWxsZWQgd2l0aCBXSVRIRE4gbm9uLW5pbC4KKiBs aXNwL25ldC9sZGFwLmVsIChsZGFwLXNlYXJjaC1pbnRlcm5hbCk6IFBhcnNlIHRoZSBkbiBs aW5lCmNvcnJlY3RseSBzbyB0aGF0IGBsZGFwLXNlYXJjaCcgY2FuIGdyb2sgaXQuICAoQnVn IzY0MDg5KQotLS0KIGxpc3AvbmV0L2xkYXAuZWwgfCAxMiArKysrKysrKysrKy0KIDEgZmls ZSBjaGFuZ2VkLCAxMSBpbnNlcnRpb25zKCspLCAxIGRlbGV0aW9uKC0pCgpkaWZmIC0tZ2l0 IGEvbGlzcC9uZXQvbGRhcC5lbCBiL2xpc3AvbmV0L2xkYXAuZWwKaW5kZXggNzg0MDU0MTRh MjguLjQyNzViNDVlNmY1IDEwMDY0NAotLS0gYS9saXNwL25ldC9sZGFwLmVsCisrKyBiL2xp c3AvbmV0L2xkYXAuZWwKQEAgLTcwMyw3ICs3MDMsMTcgQEAgbGRhcC1zZWFyY2gtaW50ZXJu YWwKIAkod2hpbGUgKHByb2duCiAJCSAoc2tpcC1jaGFycy1mb3J3YXJkICIgXHRcbiIpCiAJ CSAobm90IChlb2JwKSkpCi0gICAgICAgICAgKHNldHEgZG4gKGJ1ZmZlci1zdWJzdHJpbmcg KHBvaW50KSAobGluZS1lbmQtcG9zaXRpb24pKSkKKyAgICAgICAgICA7OyBJZ25vcmUgZmly c3QgKGRuKSBsaW5lIGlmIFdJVEhETiBlcXVhbHMgbmlsLiAgSWYgV0lUSEROCisgICAgICAg ICAgOzsgaXMgbm9uLW5pbCwgY2hlY2sgc3ludGF4IG9mIHRoZSBsaW5lIGFuZCBzcGxpdCBp dCBpbnRvIGEKKyAgICAgICAgICA7OyBwYWlyIGFzIGV4cGVjdGVkIGJ5IGBsZGFwLWRlY29k ZS1hdHRyaWJ1dGUnIChCdWcjNjQwODkpLgorICAgICAgICAgIDs7IElmIHRoZSBzeW50YXgg aXMgd3JvbmcsIGJldHRlciB0aHJvdyBhbiBlcnJvciBoZXJlLCBzaW5jZQorICAgICAgICAg IDs7IG90aGVyd2lzZSBgbGRhcC1kZWNvZGUtYXR0cmlidXRlJyB3b3VsZCB0aHJvdyBhIG11 Y2ggbGVzcworICAgICAgICAgIDs7IGNvbXByZWhlbnNpYmxlIGVycm9yIGxhdGVyLgorICAg ICAgICAgIChjb25kICgobm90IHdpdGhkbikpCisgICAgICAgICAgICAgICAgKChsb29raW5n LWF0ICJeZG5bPTpcdCBdK1xcKC4qXFwpJCIpCisgICAgICAgICAgICAgICAgIChzZXRxIGRu IChsaXN0ICJkbiIgKG1hdGNoLXN0cmluZyAxKSkpKQorICAgICAgICAgICAgICAgICh0IChl cnJvciAiSW5jb3JyZWN0IGRuIGxpbmUgXCIlc1wiIGluIGxkYXBzZWFyY2ggcmVzdWx0Igor ICAgICAgICAgICAgICAgICAgICAgICAgICAoYnVmZmVyLXN1YnN0cmluZyAocG9pbnQpIChs aW5lLWVuZC1wb3NpdGlvbikpKSkpCiAJICAoZm9yd2FyZC1saW5lIDEpCiAgICAgICAgICAg KHdoaWxlIChsb29raW5nLWF0ICJeXFwoW0EtWmEtel1bLUEtWmEtejAtOV0qXAogXFx8WzAt OV0rXFwoPzpcXC5bMC05XStcXCkqXFwpXFwoO1stQS1aYS16MC05XStcXCkqWz06XHQgXStc Ci0tIAoyLjMwLjIKCg== --------------lVF2QCPaCzi7XkmVAasEeVpd-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 16 02:00:51 2023 Received: (at 64089) by debbugs.gnu.org; 16 Jun 2023 06:00:51 +0000 Received: from localhost ([127.0.0.1]:48492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qA2Vv-0006wI-GO for submit@debbugs.gnu.org; Fri, 16 Jun 2023 02:00:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qA2Vt-0006w1-6N for 64089@debbugs.gnu.org; Fri, 16 Jun 2023 02:00:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qA2Vm-0008OH-QX; Fri, 16 Jun 2023 02:00:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=3QNQlGyL+8RR4TshGWOJODWvV4EhNtI9NUcSgyE7qAs=; b=c7J1aLpIMCE5 J38t2YelFH24pbphABfK2R9hEvrQLQs737rKo+Y3rTbjiC7p2iL36qzWp7ZD0aK0+iwuF2zZixAc0 EXrH/0HzIgpFHGPlnUwlBek73xlFLMkBZOWodUt/QjiC1I+wR0LGHe09bxItkIOrOP0Z+adsBsFNR kC28YiZIpMfuPG2Xrf4PD/Tv6w21oDwJF4rzvcfBVyDaoN5KbY3Q7eDUf0cbB7uCL1bfikN7T08nE KWcWc88NkQwvDr6kIU5P4ve7Hoazj1Pm/xZNSll7k6/GdhkiviUOqQlkJSKuCXf7b5bSaSadiIjx7 ce0xulT0/2qifbfnVpjBNQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qA2Vm-00087U-A8; Fri, 16 Jun 2023 02:00:42 -0400 Date: Fri, 16 Jun 2023 09:01:05 +0300 Message-Id: <837cs4t07y.fsf@gnu.org> From: Eli Zaretskii To: Jens Schmidt , Stefan Monnier In-Reply-To: (bug-gnu-emacs@gnu.org) Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t) References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64089 Cc: 64089@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Fri, 16 Jun 2023 00:11:15 +0200 > From: Jens Schmidt via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > With the following patch things work as expected: > > (ldap-search "(uid=)" > "ldap://" > '("mail") > nil > t) > => ((("dn" "cn=,L=,DC=,DC=COM") ("mail" > "@.com"))) > > I tried to make the patch as conservative as possible and intentionally > do not check syntax of the dn line if its parsing is not required. Stefan, any comments? I think this is okay for emacs-29; do you agree? > From a646f5aa23f051f19910286c1bf9f4580a858f0f Mon Sep 17 00:00:00 2001 > From: Jens Schmidt > Date: Fri, 16 Jun 2023 00:04:04 +0200 > Subject: [PATCH] Fix parsing of dn line if WITHDN is non-nil > > Function `ldap-search' errors out with `wrong-type-argument listp' > when called with WITHDN non-nil. > * lisp/net/ldap.el (ldap-search-internal): Parse the dn line > correctly so that `ldap-search' can grok it. (Bug#64089) > --- > lisp/net/ldap.el | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el > index 78405414a28..4275b45e6f5 100644 > --- a/lisp/net/ldap.el > +++ b/lisp/net/ldap.el > @@ -703,7 +703,17 @@ ldap-search-internal > (while (progn > (skip-chars-forward " \t\n") > (not (eobp))) > - (setq dn (buffer-substring (point) (line-end-position))) > + ;; Ignore first (dn) line if WITHDN equals nil. If WITHDN > + ;; is non-nil, check syntax of the line and split it into a > + ;; pair as expected by `ldap-decode-attribute' (Bug#64089). > + ;; If the syntax is wrong, better throw an error here, since > + ;; otherwise `ldap-decode-attribute' would throw a much less > + ;; comprehensible error later. > + (cond ((not withdn)) > + ((looking-at "^dn[=:\t ]+\\(.*\\)$") > + (setq dn (list "dn" (match-string 1)))) > + (t (error "Incorrect dn line \"%s\" in ldapsearch result" > + (buffer-substring (point) (line-end-position))))) > (forward-line 1) > (while (looking-at "^\\([A-Za-z][-A-Za-z0-9]*\ > \\|[0-9]+\\(?:\\.[0-9]+\\)*\\)\\(;[-A-Za-z0-9]+\\)*[=:\t ]+\ > -- > 2.30.2 > From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 16 11:12:19 2023 Received: (at 64089) by debbugs.gnu.org; 16 Jun 2023 15:12:19 +0000 Received: from localhost ([127.0.0.1]:50209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAB7b-0003ub-7l for submit@debbugs.gnu.org; Fri, 16 Jun 2023 11:12:19 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:16342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAB7a-0003uK-5x for 64089@debbugs.gnu.org; Fri, 16 Jun 2023 11:12:18 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 83B801004AE; Fri, 16 Jun 2023 11:12:12 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 8D64A100089; Fri, 16 Jun 2023 11:12:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1686928331; bh=v6hHVvZrEq3ss5B8whBdkHD+uyXYm967MnPldpy4yDY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=l9/nRqrUaHwccT9Z3Ma+wIDUrWthSqSx9nz9XQgNGeM6IdA4jqykTmbdBY1ryRjwi dGgpF2UTzGFRGU0R3WgZZOwxs3htSALX9mWg9WDvRjjd20XXLVBEAqGGrNxP56i7Gt +ow1Pjmc+CVEOY2C/8NeuSjWgvGLcwwo6IN0bEUGqklIv07QX+aF1zaeVa7bwt9Y6k YViif3aiyamoySoEKGuokdxGJ5nB4NNa27RC9b7rewv1wvdOncf9Qt4xIahyQQZnSb k8N+trNoky4F3A2qBvZ7G1+TNbywYKyVsNrL04q2Y9LqRbw9VIoFMagnN2MRkUsfzp gShanfjw4Zy1A== Received: from alfajor (unknown [45.44.229.252]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6F12F12062C; Fri, 16 Jun 2023 11:12:11 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t) In-Reply-To: <837cs4t07y.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 16 Jun 2023 09:01:05 +0300") Message-ID: References: <837cs4t07y.fsf@gnu.org> Date: Fri, 16 Jun 2023 11:12:10 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.084 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64089 Cc: 64089@debbugs.gnu.org, Jens Schmidt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> >> (ldap-search "(uid=)" >> "ldap://" >> '("mail") >> nil >> t) >> => ((("dn" "cn=,L=,DC=,DC=COM") ("mail" >> "@.com"))) >> >> I tried to make the patch as conservative as possible and intentionally >> do not check syntax of the dn line if its parsing is not required. > >> @@ -703,7 +703,17 @@ ldap-search-internal >> (while (progn >> (skip-chars-forward " \t\n") >> (not (eobp))) >> - (setq dn (buffer-substring (point) (line-end-position))) >> + ;; Ignore first (dn) line if WITHDN equals nil. If WITHDN >> + ;; is non-nil, check syntax of the line and split it into a >> + ;; pair as expected by `ldap-decode-attribute' (Bug#64089). >> + ;; If the syntax is wrong, better throw an error here, since >> + ;; otherwise `ldap-decode-attribute' would throw a much less >> + ;; comprehensible error later. >> + (cond ((not withdn)) >> + ((looking-at "^dn[=:\t ]+\\(.*\\)$") >> + (setq dn (list "dn" (match-string 1)))) >> + (t (error "Incorrect dn line \"%s\" in ldapsearch result" >> + (buffer-substring (point) (line-end-position))))) >> (forward-line 1) >> (while (looking-at "^\\([A-Za-z][-A-Za-z0-9]*\ >> \\|[0-9]+\\(?:\\.[0-9]+\\)*\\)\\(;[-A-Za-z0-9]+\\)*[=:\t ]+\ > > Stefan, any comments? I've no practical experience with LDAP and am not very knowledgeable about `ldap.el`, so take my opinion with a large grain of MSG. > I think this is okay for emacs-29; do you agree? This looks fine to me, indeed. Just one thing: the regexp doesn't need the `^`, right? Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 16 14:38:16 2023 Received: (at 64089) by debbugs.gnu.org; 16 Jun 2023 18:38:16 +0000 Received: from localhost ([127.0.0.1]:50347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAEKu-000157-7I for submit@debbugs.gnu.org; Fri, 16 Jun 2023 14:38:16 -0400 Received: from mr5.vodafonemail.de ([145.253.228.165]:38506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAEKs-00014u-Dz for 64089@debbugs.gnu.org; Fri, 16 Jun 2023 14:38:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1686940688; bh=CC/4cPg2M6GuloMG0R8yDJUQyT9XrwbEcNNfFa4lfNs=; h=Message-ID:Date:User-Agent:Subject:To:References:Content-Language: From:In-Reply-To:Content-Type:From; b=BqH14hMuOaobF6zO/OLfrg/mCuMnP1zAZIq9pr8ZqOlB5ABN4wPjN8OUPc3a82tC6 t8W5mHne2QdcVceYPbCBz1Z/YrPxSOY/oVzvSnj/zwSmowhwwbYeDTRV14eAQGbj0h CK4sYr1XlZ/228aN+1VF7lpr/FcIellu//sdDank= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr5.vodafonemail.de (Postfix) with ESMTPS id 4QjSb40BM3z1ycc; Fri, 16 Jun 2023 18:38:07 +0000 (UTC) Received: from [192.168.178.41] (port-92-194-181-255.dynamic.as20676.net [92.194.181.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4QjSZx281zzHpxb; Fri, 16 Jun 2023 18:37:57 +0000 (UTC) Message-ID: Date: Fri, 16 Jun 2023 20:37:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t) To: Stefan Monnier , Eli Zaretskii References: <837cs4t07y.fsf@gnu.org> Content-Language: de-DE-frami, en-US From: Jens Schmidt In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-purgate-type: clean X-purgate: clean X-purgate-size: 217 X-purgate-ID: 155817::1686940687-A9FFCD81-BEEDDE2F/0/0 X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 64089 Cc: 64089@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) On 2023-06-16 17:12, Stefan Monnier wrote: > This looks fine to me, indeed. Just one thing: the regexp doesn't need > the `^`, right? Right. I did that to mimic the regexp below that. "When in Rome ..." From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 16 18:13:48 2023 Received: (at 64089) by debbugs.gnu.org; 16 Jun 2023 22:13:48 +0000 Received: from localhost ([127.0.0.1]:50496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAHhT-0006RP-RG for submit@debbugs.gnu.org; Fri, 16 Jun 2023 18:13:48 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:33519) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAHhQ-0006RC-TH for 64089@debbugs.gnu.org; Fri, 16 Jun 2023 18:13:45 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id E91E932005C1; Fri, 16 Jun 2023 18:13:38 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 16 Jun 2023 18:13:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1686953618; x=1687040018; bh=Ur TjtOo97iExPnii+1Zkpy1aiGy7SoHfx+LvNzlTYEs=; b=XMOJYYHqb1+Or1ivxy /rIT1iLUIiCpMsgGXyob86TYG4BfJbddSbHfbghXZvGNOFdazS4plLLfqWJJ2yTQ aoUshpO5jpEQqWJcwaGR0kp8KbSwWmCe7sgCmTOlX/3cv/mqZQ1RnLyNKk4/Z4bm U8ipDhrZVzGQm0+re70D3oH2T9E26ORI6QvQpCqE5IZlfRHGinTIfz+mjH/K8eyo cJjLRfU9cUqtugIxv0cWGoOAiQsj3X599MIjT0DWxhHZ6WSd71lZU5Y54cMoelH4 KkWkPUz24FK4PW/7BdBYCPGapxBJQHW3cYZhJoWafL2UDLmrMamaF6yoRK9HpNbS h92g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1686953618; x=1687040018; bh=UrTjtOo97iExP nii+1Zkpy1aiGy7SoHfx+LvNzlTYEs=; b=RSshebqtklnobcLeNvii2i+oesW0b dTwRAGf2gj15M9aV3296ApiHUkhLL0RQoknIj43Yy9wCE3awjHMIOMExuOwwKtYy 7AzCDAma7lw+iLe7MNIDoCGCjVRmD8E1USrkS1NSKllFwPQ+0vNGaEAwswz+Getb SXQvGL5Mzblfcbw0hlAJJIy+x5xICj/I4LGyHTGHBW+BmN+HdfTqaZUkcl1E8Smk wJbFcQOFhhEeeFZN1mCO2dCVzb8xdKnZQ2GaiNyAXigokfbC+9isMq467YqOnvBJ 7ryRPwLv6ZoTxNILLXpqx8169Z52A6uRr1CgDeVwlxNXAfYeMDhRj+ZKA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedvhedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefujghffgffkfggtgesthdtredttdertdenucfhrhhomhephfhilhhi phhpucfiuhhnsghinhcuoehfghhunhgsihhnsehfrghsthhmrghilhdrfhhmqeenucggtf frrghtthgvrhhnpeffhfejveeiieeiudetgfehffelieevfeeffedtkeelheeludefueeu udehveeiffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehfghhunhgsihhnsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Feedback-ID: id48c41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 16 Jun 2023 18:13:36 -0400 (EDT) From: Filipp Gunbin To: Jens Schmidt Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t In-Reply-To: (Jens Schmidt's message of "Fri, 16 Jun 2023 00:11:15 +0200") References: User-Agent: Gnus/5.13 (Gnus v5.13) Date: Sat, 17 Jun 2023 01:13:33 +0300 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 64089 Cc: Eli Zaretskii , 64089@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Jens, thanks for reporting this. On 16/06/2023 00:11 +0200, Jens Schmidt wrote: > With the following patch things work as expected: > > (ldap-search "(uid=)" > "ldap://" > '("mail") > nil > t) > => ((("dn" "cn=,L=,DC=,DC=COM") ("mail" > "@.com"))) > > I tried to make the patch as conservative as possible and > intentionally do not check syntax of the dn line if its parsing is not > required. I think I have better patch here. This is what it addresses: 1) The bug you reported. My patch tries to keep the API intact (we don't want breakage, however I think not much people actually use withdn arg): return dn as a string, prepended to attribute alist. 2) dn is now parsed just like the other attributes, with the same regexp. 3) (unrelated, just noticed and fixed) Match data clobbering in this piece: - ;; Need to handle file:///D:/... as generated by OpenLDAP - ;; on DOS/Windows as local files. - (if (and (memq system-type '(windows-nt ms-dos)) - (eq (string-match "/\\(.:.*\\)$" value) 0)) - (setq value (match-string 1 value))) 4) This code: + (when dn + (cond (withdn + (push (cons dn (nreverse record)) + result)) intentionally doesn't check whether record is non-nil: potentially we could request "no attributes" (there's an option for that in ldapsearch, however I don't think this is currently possible in ldap.el), and it's ok to return just dn. Please give it a try, if it's OK and others have no objections, I'll install it on Monday (on master, I guess). Thanks. Filipp diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index 78405414a28..3048b7e7a2f 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el @@ -487,7 +487,9 @@ ldap-search (if ldap-ignore-attribute-codings result (mapcar (lambda (record) - (mapcar #'ldap-decode-attribute record)) + (append (and withdn (list (car record))) + (mapcar #'ldap-decode-attribute + (if withdn (cdr record) record)))) result)))) (defun ldap-password-read (host) @@ -703,35 +705,42 @@ ldap-search-internal (while (progn (skip-chars-forward " \t\n") (not (eobp))) - (setq dn (buffer-substring (point) (line-end-position))) - (forward-line 1) (while (looking-at "^\\([A-Za-z][-A-Za-z0-9]*\ \\|[0-9]+\\(?:\\.[0-9]+\\)*\\)\\(;[-A-Za-z0-9]+\\)*[=:\t ]+\ \\(<[\t ]*file://\\)?\\(.*\\)$") (setq name (match-string 1) value (match-string 4)) - ;; Need to handle file:///D:/... as generated by OpenLDAP - ;; on DOS/Windows as local files. - (if (and (memq system-type '(windows-nt ms-dos)) - (eq (string-match "/\\(.:.*\\)$" value) 0)) - (setq value (match-string 1 value))) - ;; Do not try to open non-existent files - (if (match-string 3) - (with-current-buffer bufval - (erase-buffer) - (set-buffer-multibyte nil) - (insert-file-contents-literally value) - (delete-file value) - (setq value (buffer-string))) - (setq value " ")) - (setq record (cons (list name value) - record)) + (when (memq system-type '(windows-nt ms-dos)) + ;; Need to handle file:///D:/... as generated by + ;; OpenLDAP on DOS/Windows as local files. + (save-match-data + (when (eq (string-match "/\\(.:.*\\)$" value) 0) + (setq value (match-string 1 value))))) + (cond ((match-string 3) ;normal value written to a file + (with-current-buffer bufval + (erase-buffer) + (set-buffer-multibyte nil) + (insert-file-contents-literally value) + (delete-file value) + (setq value (buffer-string)))) + (;; dn is output inline + (string-equal-ignore-case name "dn") + (setq dn value + name nil + value nil)) + (t (setq value " "))) + (and name value + (setq record (cons (list name value) + record))) (forward-line 1)) - (cond (withdn - (push (cons dn (nreverse record)) result)) - (record - (push (nreverse record) result))) - (setq record nil) + (when dn + (cond (withdn + (push (cons dn (nreverse record)) + result)) + (record + (push (nreverse record) result)))) + (setq record nil + dn nil) (message "Parsing results... %d" numres) (setq numres (1+ numres))) (message "Parsing results... done") From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 17 02:03:37 2023 Received: (at 64089) by debbugs.gnu.org; 17 Jun 2023 06:03:37 +0000 Received: from localhost ([127.0.0.1]:50729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAP28-0005BW-RU for submit@debbugs.gnu.org; Sat, 17 Jun 2023 02:03:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAP24-0005BE-28 for 64089@debbugs.gnu.org; Sat, 17 Jun 2023 02:03:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAP1y-0002Ni-IU; Sat, 17 Jun 2023 02:03:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=eJQ2taW7OFGJDA2rHBuqTicfR5jhVdqOdS3RtQSoXSA=; b=pH1x0rHBdB/m 1CQO/0ts8t9Olp+Q9GrkcP4nFKUgqQ38Uwv5LnUn/JRHGStw+xw0JFi5frW3fsdgeRkdFzGwmsCNj hpY6/7zy9+z6UlPN/MunuAuxxTRMTarxI/3mcP5Lox/qaX4k8B8/Qze/GRahnO0WqmAYi+Ahr4kBY pOBmzLuA1A+Q7DAeCua1LHj23DR5AYPDxMElvJKBByPd2C1Emuu8VTL9RsZ5fwVAuqwDfh4LUumci FPdqbEv5EUJauVG/gjp7gMC2Tpm2GbryPBQSOLIB3Fn5g8o8Zse1fryeNcLLl5SnKfWvEeSlvaUrY 33KLDLRMf34KSCIz9DGweQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAP1y-0000yF-6i; Sat, 17 Jun 2023 02:03:26 -0400 Date: Sat, 17 Jun 2023 09:03:25 +0300 Message-Id: <83cz1usk0i.fsf@gnu.org> From: Eli Zaretskii To: Filipp Gunbin In-Reply-To: (message from Filipp Gunbin on Sat, 17 Jun 2023 01:13:33 +0300) Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64089 Cc: 64089@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Filipp Gunbin > Cc: 64089@debbugs.gnu.org, Stefan Monnier , Eli > Zaretskii > Date: Sat, 17 Jun 2023 01:13:33 +0300 > > > I tried to make the patch as conservative as possible and > > intentionally do not check syntax of the dn line if its parsing is not > > required. > > I think I have better patch here. This is what it addresses: > > 1) The bug you reported. My patch tries to keep the API intact (we > don't want breakage, however I think not much people actually use withdn > arg): return dn as a string, prepended to attribute alist. > > 2) dn is now parsed just like the other attributes, with the same > regexp. > > 3) (unrelated, just noticed and fixed) Match data clobbering in this > piece: > > - ;; Need to handle file:///D:/... as generated by OpenLDAP > - ;; on DOS/Windows as local files. > - (if (and (memq system-type '(windows-nt ms-dos)) > - (eq (string-match "/\\(.:.*\\)$" value) 0)) > - (setq value (match-string 1 value))) > > 4) This code: > > + (when dn > + (cond (withdn > + (push (cons dn (nreverse record)) > + result)) > > intentionally doesn't check whether record is non-nil: potentially we > could request "no attributes" (there's an option for that in ldapsearch, > however I don't think this is currently possible in ldap.el), and it's > ok to return just dn. > > Please give it a try, if it's OK and others have no objections, I'll > install it on Monday (on master, I guess). Yes, this is more complex change, so it is not appropriate for emacs-29. I think I will install Jens's patch on emacs-29 marking it not for merging to master. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 17 04:40:43 2023 Received: (at 64089) by debbugs.gnu.org; 17 Jun 2023 08:40:43 +0000 Received: from localhost ([127.0.0.1]:50852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qARUA-0000o9-Ua for submit@debbugs.gnu.org; Sat, 17 Jun 2023 04:40:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qARU8-0000nt-Kq for 64089@debbugs.gnu.org; Sat, 17 Jun 2023 04:40:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qARU2-0002KZ-6n; Sat, 17 Jun 2023 04:40:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=q+cP6wcCfRpf6jONflbp92Myx8Z1Bh1jNs16t9+dm3s=; b=p6YCM1xAv8ej pB95RPKnVhXOvRO1AixkgihCA6cLrmFPlYxS8letrJeqbEHZZbDisn+MdpqncqqMekbXE0K10ayem CRCb4M8rr0CXGIuRjfna65/sxclzP7c2i6GC18Gy5iUZcXnxqVNB/S9wXph3iGfrtwtF6qU4Fg2Ob ZSuDsxO4PKzxJea2D/sB8NUw9ViuxU22MpcWWPQNPJjcmknalUOZMjjo1PBt3Jo0FB9N4yyOfIuZm MrGLyk16C/UN3YBCYBzsl9KUscr4fu03R1sHNjHflEs0rgoUjgljkuQs4cNlQodXLs5ic9K7Vgl71 Yfl0Gph5ArDWZlawwGUU+g==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qARU1-0004zy-I1; Sat, 17 Jun 2023 04:40:33 -0400 Date: Sat, 17 Jun 2023 11:40:33 +0300 Message-Id: <83mt0yqy66.fsf@gnu.org> From: Eli Zaretskii To: Jens Schmidt In-Reply-To: (message from Jens Schmidt on Fri, 16 Jun 2023 20:37:53 +0200) Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t) References: <837cs4t07y.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64089 Cc: 64089@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Fri, 16 Jun 2023 20:37:53 +0200 > Cc: 64089@debbugs.gnu.org > From: Jens Schmidt > > On 2023-06-16 17:12, Stefan Monnier wrote: > > > This looks fine to me, indeed. Just one thing: the regexp doesn't need > > the `^`, right? > > Right. I did that to mimic the regexp below that. "When in Rome ..." Thanks, I've now installed this on the emacs-29 branch (but forgot to say "do not merge to master", sorry). From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 17 04:42:03 2023 Received: (at 64089) by debbugs.gnu.org; 17 Jun 2023 08:42:03 +0000 Received: from localhost ([127.0.0.1]:50857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qARVS-0000qM-BJ for submit@debbugs.gnu.org; Sat, 17 Jun 2023 04:42:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qARVQ-0000q4-Hz for 64089@debbugs.gnu.org; Sat, 17 Jun 2023 04:42:01 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qARVL-0002Ug-0D; Sat, 17 Jun 2023 04:41:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ama3sD3SAoHJ06mfDqKWvOEwPdqFRe748qjbyhJIDHY=; b=E5Y+R1iIP/VJ xO28qslISdoTLWj14CXxhESpbu06Wn0PnQ4gieuUzKXaC0B2qhVcsjDWufl/l8HM8M1UqUzeIhWtk gpXY/CkHRsWnHMiy/Bq7KdvC9+l6NbaLeqUPOldrjkfctHKDN6bNkGZA0TPdvVjTy3k3MF3aK4Kjp 4boRRc/0zAb9VYAp7p5nmZm7sFB1y3ghrA8JMc8HpltixWlp2K04CxqqPzpxo/ZF7dZTVWv2cq8BD 1fCrO2xN+M4BXuKpfPORt6xowK4UI1XIdvMCFFT4ursYzDzOUveaBwefLf4MC/TOzoyeGjzRhFsRt 8VzJuZ2EoIuiiGUKIFRWIg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qARVK-00054U-Gn; Sat, 17 Jun 2023 04:41:54 -0400 Date: Sat, 17 Jun 2023 11:41:54 +0300 Message-Id: <83legiqy3x.fsf@gnu.org> From: Eli Zaretskii To: fgunbin@fastmail.fm In-Reply-To: <83cz1usk0i.fsf@gnu.org> (message from Eli Zaretskii on Sat, 17 Jun 2023 09:03:25 +0300) Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t References: <83cz1usk0i.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64089 Cc: jschmidt4gnu@vodafonemail.de, 64089@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 64089@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de, > monnier@iro.umontreal.ca > Date: Sat, 17 Jun 2023 09:03:25 +0300 > From: Eli Zaretskii > > > From: Filipp Gunbin > > Cc: 64089@debbugs.gnu.org, Stefan Monnier , Eli > > Zaretskii > > Date: Sat, 17 Jun 2023 01:13:33 +0300 > > > > > I tried to make the patch as conservative as possible and > > > intentionally do not check syntax of the dn line if its parsing is not > > > required. > > > > I think I have better patch here. This is what it addresses: > > > > 1) The bug you reported. My patch tries to keep the API intact (we > > don't want breakage, however I think not much people actually use withdn > > arg): return dn as a string, prepended to attribute alist. > > > > 2) dn is now parsed just like the other attributes, with the same > > regexp. > > > > 3) (unrelated, just noticed and fixed) Match data clobbering in this > > piece: > > > > - ;; Need to handle file:///D:/... as generated by OpenLDAP > > - ;; on DOS/Windows as local files. > > - (if (and (memq system-type '(windows-nt ms-dos)) > > - (eq (string-match "/\\(.:.*\\)$" value) 0)) > > - (setq value (match-string 1 value))) > > > > 4) This code: > > > > + (when dn > > + (cond (withdn > > + (push (cons dn (nreverse record)) > > + result)) > > > > intentionally doesn't check whether record is non-nil: potentially we > > could request "no attributes" (there's an option for that in ldapsearch, > > however I don't think this is currently possible in ldap.el), and it's > > ok to return just dn. > > > > Please give it a try, if it's OK and others have no objections, I'll > > install it on Monday (on master, I guess). > > Yes, this is more complex change, so it is not appropriate for > emacs-29. > > I think I will install Jens's patch on emacs-29 marking it not for > merging to master. Now done, but without the "do not merge" mark, sorry. So on master you will need to undo the fix (but please wait for me to merge from the branch to master). From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 17 05:07:32 2023 Received: (at 64089) by debbugs.gnu.org; 17 Jun 2023 09:07:32 +0000 Received: from localhost ([127.0.0.1]:50867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qARu8-0001W0-2T for submit@debbugs.gnu.org; Sat, 17 Jun 2023 05:07:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qARu6-0001Vp-My for 64089@debbugs.gnu.org; Sat, 17 Jun 2023 05:07:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qARu0-0007UM-HH; Sat, 17 Jun 2023 05:07:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=OVVOpFLrnNGcE1IFjFGIqihIoMhJxCZKGGNIn6fz4sk=; b=TCe5YnXDsIse 9jMLzUpfTDkHkPhRt3eAjZDXl3YDw10G2eShGFlmGOVV0PAVBa1+sqvruVh7AJSJ9lOCrTCPzEbFU WaqZiUg7onl+yWzjFFQvhO/F1NrLVyv365W8U9oEclyXF8mphUNy0etgqxn1BQpfNUxTeKLiLbJ/Z PM2ebX8CaREyaAmmpO4o496ExAYopmN9AmMXvGao0ghvF6hMTBCr/JoXpiZmE6TsnBFyBBva8bh9S +MS+c7+Fi3+g+IIc8YeuBHfX6nhdvKzvm2VuGSXKb91Lqvm1Sp2kLrNyTCtPmDktr4CH81BNDytJY uj4zK9BWi5BG5A7KDEHkSQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qARtz-0003Og-L7; Sat, 17 Jun 2023 05:07:24 -0400 Date: Sat, 17 Jun 2023 12:07:22 +0300 Message-Id: <83h6r6qwxh.fsf@gnu.org> From: Eli Zaretskii To: fgunbin@fastmail.fm, jschmidt4gnu@vodafonemail.de In-Reply-To: <83legiqy3x.fsf@gnu.org> (message from Eli Zaretskii on Sat, 17 Jun 2023 11:41:54 +0300) Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64089 Cc: 64089@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: jschmidt4gnu@vodafonemail.de, 64089@debbugs.gnu.org, > monnier@iro.umontreal.ca > Date: Sat, 17 Jun 2023 11:41:54 +0300 > From: Eli Zaretskii > > > I think I will install Jens's patch on emacs-29 marking it not for > > merging to master. > > Now done, but without the "do not merge" mark, sorry. So on master > you will need to undo the fix (but please wait for me to merge from > the branch to master). I eventually skipped the fix manually when merging, so you (Filipp) can now install your fix on master, once you-all agree on that. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 17 19:15:27 2023 Received: (at 64089) by debbugs.gnu.org; 17 Jun 2023 23:15:27 +0000 Received: from localhost ([127.0.0.1]:52797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAf8g-0006cB-Q9 for submit@debbugs.gnu.org; Sat, 17 Jun 2023 19:15:27 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:50405) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAf8d-0006bu-6C for 64089@debbugs.gnu.org; Sat, 17 Jun 2023 19:15:25 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 2448B5C00DD; Sat, 17 Jun 2023 19:15:18 -0400 (EDT) Received: from imap49 ([10.202.2.99]) by compute5.internal (MEProxy); Sat, 17 Jun 2023 19:15:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1687043718; x=1687130118; bh=cJ sFeyN1rtCvHDscxb5jiFiuOcxrftEGGpyTZnAh0Fk=; b=bzS9cTV75+d0IwXH49 xbAejhBMJ874fQmis+FIff54lIwpJrU/KXzw+1YwZW8pzkZePYk24w2gnohj1o6U DqVU+9wlA5YpsVXkLmvXskrPR3+Xrz1twNzcF2D12RdRJ8aEKIKjEBW2VkiaAAQT 90T9GnUUSLEjZb5LIv/uBvpPfbDIwNfpqzBzkMQay2qDJITSse8Q4/DRXl3hIgQY 4oK2KVOFezE5TJeHvV9bqQjlBiw2VRqbT1DJbOfQGW42jsfWHZHOnsckDjsYJgFb ePlJZX9GIGnRcaug2WHU1rLKckRfy8XETOQPrRG+IAhq9NBT00S+4s+hd6dSBqQc YAsw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1687043718; x=1687130118; bh=cJsFeyN1rtCvH Dscxb5jiFiuOcxrftEGGpyTZnAh0Fk=; b=fqzoqHn6KBsEdIj6xzuJS5g9xNepa MEwcG3HHrbNrPWztu5vnXEETQMzejnGXGRcRMlFoRpPuYkr7PX6Sx02xg2qeymrM QmkYgvqpwjcdduKNeipfANbIAtbRxFnR8ETM5BFcNL+OaU7bHnX/ph9M48k9OQ5d /c8xP4m2EmWQKE3cHMSZsSV7NyvWBkBmB3kbQNKl+DI8ZiySfizrmiy31NhJFkfE rUGv0KVli3dILrSlZRkLOynUs4lcWmgw5ExOaY1kctcAh8OTorarjCEdosJ6ktGp HJYQFMWPinnfjz1wqNE+jl1b/YdT0xtlrVjLkOQ5/mhKfeR2TMt+i7Yhg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedvkedgvdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedfhfhi lhhiphhpucfiuhhnsghinhdfuceofhhguhhnsghinhesfhgrshhtmhgrihhlrdhfmheqne cuggftrfgrthhtvghrnhepieegkeekudehledvkefhfeegtdegvdevffejveeiudfhkedu vdeukedvfeegheehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepfhhguhhnsghinhesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: id48c41f1:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id A70EC15A008E; Sat, 17 Jun 2023 19:15:17 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-496-g8c46984af0-fm-20230615.001-g8c46984a Mime-Version: 1.0 Message-Id: In-Reply-To: <83h6r6qwxh.fsf@gnu.org> References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> Date: Sun, 18 Jun 2023 02:14:31 +0300 From: "Filipp Gunbin" To: "Eli Zaretskii" , jschmidt4gnu@vodafonemail.de Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 64089 Cc: 64089@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Thanks, but the problem is that - the code before the fix prepended dn as string (and it's not totally broken - you can skip attribute translation via var/defcustom, in which case the error should not be triggered) - the fix on emacs-29 now prepends it as cons cell - my change on master will again use string form So I'd prefer that we leave that unfixed on emacs-29 instead of creating this mess.. Or correct cons cell -> string, if it's worth the trouble. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 18 01:22:57 2023 Received: (at 64089) by debbugs.gnu.org; 18 Jun 2023 05:22:57 +0000 Received: from localhost ([127.0.0.1]:52942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAksL-0007kq-C4 for submit@debbugs.gnu.org; Sun, 18 Jun 2023 01:22:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAksG-0007kb-VD for 64089@debbugs.gnu.org; Sun, 18 Jun 2023 01:22:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAksB-0007yk-8m; Sun, 18 Jun 2023 01:22:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=iXZjgYCYX7+wiln8Qkap74DRjyRdLBB0IMQWtNM/PSk=; b=WJJPcqkwRqPH zTRus9aTB/AMvwS5y5dPtiXIgyZXiBeygLESYNp9GKAE6i3z1aejy7QCC6HIL1JCGiPhOS1IxMu0N Bl2vZrn1rEdJAPmWE6H2dTN4HqEIJ3ghxxQf89M6xfNRXxf0b6h91PZ2ikkGRp7pcFMX1sSkg2Y2C rrCG4AeSyS7lDlJlyPCNRL52OL1F2JSyeYmDhQPc/+hAH4VU3xltmGputaEmstzUdn/6ybnHbvKqU jMh++nVPxwO71qHsrKVxEHQAQmQUsT+0bPwf8qmbTC00bUON5niIaO6Flvzf93PNCX2H86cBEmXgl 2pwo9toycOtfYIUsQwjyBw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAksA-0001lf-Ii; Sun, 18 Jun 2023 01:22:46 -0400 Date: Sun, 18 Jun 2023 08:22:47 +0300 Message-Id: <83mt0xpcns.fsf@gnu.org> From: Eli Zaretskii To: "Filipp Gunbin" In-Reply-To: (fgunbin@fastmail.fm) Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64089 Cc: 64089@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 18 Jun 2023 02:14:31 +0300 > From: "Filipp Gunbin" > Cc: 64089@debbugs.gnu.org, monnier@iro.umontreal.ca > > Thanks, but the problem is that > > - the code before the fix prepended dn as string (and it's not totally broken - you can skip attribute translation via var/defcustom, in which case the error should not be triggered) > - the fix on emacs-29 now prepends it as cons cell > - my change on master will again use string form > > So I'd prefer that we leave that unfixed on emacs-29 instead of creating this mess.. Or correct cons cell -> string, if it's worth the trouble. Sorry, I don't understand why we'd like to leave it unfixed. Please elaborate. In particular, it is entirely legitimate for master to have a different solution. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 18 03:43:48 2023 Received: (at 64089) by debbugs.gnu.org; 18 Jun 2023 07:43:48 +0000 Received: from localhost ([127.0.0.1]:53099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAn4e-0003QK-7I for submit@debbugs.gnu.org; Sun, 18 Jun 2023 03:43:48 -0400 Received: from mr6.vodafonemail.de ([145.253.228.166]:46572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAn4b-0003Q4-SU for 64089@debbugs.gnu.org; Sun, 18 Jun 2023 03:43:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1687074219; bh=cdNw+15XxdKYv8Vn3NIv/zoAzQeWtPv+KbLXZ2BwqRQ=; h=Message-ID:Date:User-Agent:Subject:Content-Language:To:References: From:In-Reply-To:Content-Type:From; b=DdFCEQDk1jNtd1LiTdvg+ULq80mrNuhWn3apWx9UiVXM+axSpAxNJMV4ipiqeuAl2 o9co46687cTo4jVa6yZ8JvlAE5fclaYmCBtZ6XSIYF97/0iYK+p6AHsGm7RKQBSXgO uX9d52S6NNc1FxM/O/xAXr78tPrX/gZgWZYdQB34= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr6.vodafonemail.de (Postfix) with ESMTPS id 4QkPyz2wr1z1y4J; Sun, 18 Jun 2023 07:43:39 +0000 (UTC) Received: from [192.168.0.74] (p54a6dbed.dip0.t-ipconnect.de [84.166.219.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4QkPyj1y0FzMks6; Sun, 18 Jun 2023 07:43:22 +0000 (UTC) Message-ID: <704ffb16-a822-8fed-6d63-4d9fc9a2b16e@vodafonemail.de> Date: Sun, 18 Jun 2023 09:43:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t Content-Language: de-DE-frami, en-US To: Filipp Gunbin , Eli Zaretskii References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> From: Jens Schmidt In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-purgate-type: clean X-purgate: clean X-purgate-size: 1474 X-purgate-ID: 155817::1687074215-9AFFAEE7-89B5F1F3/0/0 X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 64089 Cc: 64089@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) On 2023-06-18 01:14, Filipp Gunbin wrote: > - the code before the fix prepended dn as string (and it's not > totally broken - you can skip attribute translation via > var/defcustom, in which case the error should not be triggered) The problem is that WITHDN == t IMHO can mean various things, each interpretation having some valid reasons (note that your implementation differs from the original one as well!) - My proposal: ((("dn" "cn=JENS_SCHMIDT,L=REGION,DC=COMPANY,DC=COM") ("mail" "jens.schmidt@company.com"))) I'd like to have the distinguished name available in EUDC eventually to do fun things with it. Traversing our (and other's?) company's hierarchy, to be precise. - Your proposal: (("cn=JENS_SCHMIDT,L=REGION,DC=COMPANY,DC=COM" ("mail" "jens.schmidt@company.com"))) This makes an alist out of the overall result, also fine. - The original author's (Gerd's) possible intent, since he never actually split off the leading "dn": (("dn: cn=JENS_SCHMIDT,L=REGION,DC=COMPANY,DC=COM" ("mail" "jens.schmidt@company.com"))) Not sure what this would be good for, though. I think we should account (in emacs-master) for these various options and make WITHDN take various values: `cons' - return my interpretation `string' - return yours t - return Gerd's Or whatever. In any case, I'll open a new bug for that to continue this discussion. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 18 04:51:51 2023 Received: (at 64089) by debbugs.gnu.org; 18 Jun 2023 08:51:51 +0000 Received: from localhost ([127.0.0.1]:53174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAo8V-0005GR-5Z for submit@debbugs.gnu.org; Sun, 18 Jun 2023 04:51:51 -0400 Received: from mr6.vodafonemail.de ([145.253.228.166]:49456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAo8S-0005GD-MD for 64089@debbugs.gnu.org; Sun, 18 Jun 2023 04:51:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1687078303; bh=D0jeireo1X23eGbu9aPHESQQP68NaN0bFSyz9Erye1s=; h=Message-ID:Date:User-Agent:Subject:Content-Language:From:To: References:In-Reply-To:Content-Type:From; b=Lr7+Y0W6f39qqcwmPX4yqTpJNbdW7fe1BlLMXZNCUfgLieyuZLHUnTQ8u2YKXLXcY YuyQXymViZabQDhk1naMu3R0aLaHZozP4+hdtmOSJoOqK7Q9ysNDWmWR5e4jhZx9aK zzhWMRhobMSFflKBTPBORb6CpShWpbnGh63WOE/c= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr6.vodafonemail.de (Postfix) with ESMTPS id 4QkRTV6Xhxz1xsD; Sun, 18 Jun 2023 08:51:42 +0000 (UTC) Received: from [192.168.0.74] (p54a6dbed.dip0.t-ipconnect.de [84.166.219.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4QkRTF0c5RzHnHk; Sun, 18 Jun 2023 08:51:26 +0000 (UTC) Message-ID: <7bc4f6cf-bd37-c7d6-6253-db5f82099e1e@vodafonemail.de> Date: Sun, 18 Jun 2023 10:51:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t Content-Language: de-DE-frami, en-US From: Jens Schmidt To: Filipp Gunbin , Eli Zaretskii References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> <704ffb16-a822-8fed-6d63-4d9fc9a2b16e@vodafonemail.de> In-Reply-To: <704ffb16-a822-8fed-6d63-4d9fc9a2b16e@vodafonemail.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-purgate-type: clean X-purgate: clean X-purgate-size: 1286 X-purgate-ID: 155817::1687078298-29FF90CB-7D4B6ABE/0/0 X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 64089 Cc: 64089@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) On 2023-06-18 09:43, Jens Schmidt wrote: > Or whatever. In any case, I'll open a new bug for that to continue > this discussion. And of course, Filipp is right w.r.t. to API consistency. TBH, I simply haven't payed attention to `ldap-ignore-attribute-codings' until recently. So for emacs-29, I can provide a patch that backs out my previous patch and fixes the bug such that the *original/Gerd's* string "dn: cn=JENS_SCHMIDT,L=REGION,DC=COMPANY,DC=COM" gets appended to the result w/o triggering the wrong-type-argument listp for both `ldap-ignore-attribute-codings' equaling nil and non-nil. Basicaly the upper half of Filipp's patch, but redone such that even I understand it without too much eye-balling :-). Like this probably (not tested yet!): (cond (ldap-ignore-attribute-codings result) (withdn ;; Do not process first elements of the records ;; with `ldap-decode-attribute' (Bug#64089). (mapcar (lambda (record) (cons (car record) (mapcar #'ldap-decode-attribute (cdr record))) result))) (t (mapcar (lambda (record) (mapcar #'ldap-decode-attribute record)) result)))) WDYT? From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 18 04:56:17 2023 Received: (at 64089) by debbugs.gnu.org; 18 Jun 2023 08:56:17 +0000 Received: from localhost ([127.0.0.1]:53187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAoCn-0005NQ-5F for submit@debbugs.gnu.org; Sun, 18 Jun 2023 04:56:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAoCl-0005NF-9x for 64089@debbugs.gnu.org; Sun, 18 Jun 2023 04:56:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAoCg-0004dD-1d; Sun, 18 Jun 2023 04:56:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=YMHGyBbL177XWzAs5cfmYE5olou8oVxmTOvzmz6u0Xg=; b=Hew+U8+XbAI9 5cI2UoIGfMM25u6KRTmIWbDdQboLFXd20AFNmuXY3RwJ250phAvbjDzgfarKuZUyVkRc6Jd5d85pc I0E067xoRfY+hy9K+i3FXZ9uKgjNbgmwIRfwfyiAQNwHhGw/ngAVgkdYsTfXdpgSpDYqBQDEwwgp4 QYwzXXtlW3dVVu/GElYgFBMr4KM65keyvbtX3Z+zbFaprHIocZ6N59GW55SMMLDdN10tSAMTZt9F7 ojy8dsFe+fOqX01NoPhstbyhGyk+Cbm6sDJ0E0glmzJf1YZGC9u/nrfud5FRLWYSh8hXooDpHLUdX QemdDY4tCvslUKIP8XKFew==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAoCf-0003mM-Fn; Sun, 18 Jun 2023 04:56:09 -0400 Date: Sun, 18 Jun 2023 11:56:11 +0300 Message-Id: <831qi9p2s4.fsf@gnu.org> From: Eli Zaretskii To: Jens Schmidt In-Reply-To: <7bc4f6cf-bd37-c7d6-6253-db5f82099e1e@vodafonemail.de> (message from Jens Schmidt on Sun, 18 Jun 2023 10:51:25 +0200) Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> <704ffb16-a822-8fed-6d63-4d9fc9a2b16e@vodafonemail.de> <7bc4f6cf-bd37-c7d6-6253-db5f82099e1e@vodafonemail.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64089 Cc: 64089@debbugs.gnu.org, fgunbin@fastmail.fm, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 18 Jun 2023 10:51:25 +0200 > From: Jens Schmidt > Cc: 64089@debbugs.gnu.org, monnier@iro.umontreal.ca > > On 2023-06-18 09:43, Jens Schmidt wrote: > > > Or whatever. In any case, I'll open a new bug for that to continue > > this discussion. > > And of course, Filipp is right w.r.t. to API consistency. TBH, I simply > haven't payed attention to `ldap-ignore-attribute-codings' until > recently. So for emacs-29, I can provide a patch that backs out my > previous patch and fixes the bug such that the *original/Gerd's* string > > "dn: cn=JENS_SCHMIDT,L=REGION,DC=COMPANY,DC=COM" > > gets appended to the result w/o triggering the > > wrong-type-argument listp > > for both `ldap-ignore-attribute-codings' equaling nil and non-nil. > > Basicaly the upper half of Filipp's patch, but redone such that even I > understand it without too much eye-balling :-). Like this probably (not > tested yet!): > > (cond > (ldap-ignore-attribute-codings > result) > (withdn > ;; Do not process first elements of the records > ;; with `ldap-decode-attribute' (Bug#64089). > (mapcar (lambda (record) > (cons (car record) > (mapcar #'ldap-decode-attribute > (cdr record))) > result))) > (t > (mapcar (lambda (record) > (mapcar #'ldap-decode-attribute record)) > result)))) > > WDYT? I'm uncomfortable with non-trivial changes, so if this is anywhere like Filipp's proposal, I'd rather leave it unfixed on emacs-29. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 18 07:04:46 2023 Received: (at 64089) by debbugs.gnu.org; 18 Jun 2023 11:04:46 +0000 Received: from localhost ([127.0.0.1]:53258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAqD8-0002rv-7e for submit@debbugs.gnu.org; Sun, 18 Jun 2023 07:04:46 -0400 Received: from mr4.vodafonemail.de ([145.253.228.164]:42814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAqD6-0002ri-5u for 64089@debbugs.gnu.org; Sun, 18 Jun 2023 07:04:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1687086278; bh=LNl9JgXbwJKgpsIn7W0AM3AmqoSy5s7KuauM0jqrQUk=; h=Content-Type:Message-ID:Date:User-Agent:Subject:Content-Language: To:References:From:In-Reply-To:From; b=bHgeSvHZc8lS+DaBPb+x5kqgMWWXhtibw8vgDEG3AmgTVpzz1c73S7tugbteEZ6xX piRQOA6Hsm0YuH7gdmNYdYD3S/qreJlGvtoCS6Hd+yBFp2QjOFj/+7IqAGbPWE6qpT 12FRLyqy55AvzaXIfBIjOn5IRStdzNYNDfIp5L3Y= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr4.vodafonemail.de (Postfix) with ESMTPS id 4QkVQt3rWNz1y37; Sun, 18 Jun 2023 11:04:38 +0000 (UTC) Received: from [192.168.0.74] (p54a6dbed.dip0.t-ipconnect.de [84.166.219.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4QkVQc56pqzMks0; Sun, 18 Jun 2023 11:04:21 +0000 (UTC) Content-Type: multipart/mixed; boundary="------------PvKvqP87aKCgQVEWJDZdwh1f" Message-ID: <09a0ca0e-8c80-8775-f385-222e23606307@vodafonemail.de> Date: Sun, 18 Jun 2023 13:04:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t Content-Language: de-DE-frami, en-US To: Eli Zaretskii References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> <704ffb16-a822-8fed-6d63-4d9fc9a2b16e@vodafonemail.de> <7bc4f6cf-bd37-c7d6-6253-db5f82099e1e@vodafonemail.de> <831qi9p2s4.fsf@gnu.org> From: Jens Schmidt In-Reply-To: <831qi9p2s4.fsf@gnu.org> X-purgate-type: clean X-purgate: clean X-purgate-size: 9227 X-purgate-ID: 155817::1687086274-9AFFAEE7-00FE04FB/0/0 X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 64089 Cc: 64089@debbugs.gnu.org, fgunbin@fastmail.fm, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) This is a multi-part message in MIME format. --------------PvKvqP87aKCgQVEWJDZdwh1f Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2023-06-18 10:56, Eli Zaretskii wrote: > I'm uncomfortable with non-trivial changes, so if this is anywhere > like Filipp's proposal, I'd rather leave it unfixed on emacs-29. So here are patch 0001-Undo-suboptimal-fix-for-dn-line-parsing.patch to back out my initial fix, plus *alternative* patches 0002-filipp-Do-not-process-dn-entry-with-ldap-decode-attribute.patch 0002-jschmidt-Do-not-process-dn-entry-with-ldap-decode-attribute.patch Both fix this issue while keeping complete API stability. Filipps is a bit shorter, but IMHO harder to read plus slightly less efficient on runtime, mine is a bit longer since it (partially) duplicates code. Both give the same results, in particular independently of the setting of `ldap-ignore-attribute-codings': (ldap-search "(uid=jeschmid)" "ldap://ldap.company.com" '("mail")) => ((("mail" "jens.schmidt@company.com"))) (let ((ldap-ignore-attribute-codings t)) (ldap-search "(uid=jeschmid)" "ldap://ldap.company.com" '("mail") nil t) => (("dn: cn=JENS_SCHMIDT,L=REGION,DC=COMPANY,DC=COM" ("mail" "jens.schmidt@company.com"))) (let ((ldap-ignore-attribute-codings nil)) (ldap-search "(uid=jeschmid)" "ldap://ldap.company.com" '("mail") nil t) => (("dn: cn=JENS_SCHMIDT,L=REGION,DC=COMPANY,DC=COM" ("mail" "jens.schmidt@company.com"))) Feel free to apply whatever you think appropriate. Please on *emacs-29 only* (I haven't found how to mark that). Then please close this bug. Thanks --------------PvKvqP87aKCgQVEWJDZdwh1f Content-Type: text/x-patch; charset=UTF-8; name="0001-Undo-suboptimal-fix-for-dn-line-parsing.patch" Content-Disposition: attachment; filename="0001-Undo-suboptimal-fix-for-dn-line-parsing.patch" Content-Transfer-Encoding: base64 RnJvbSAyNGE4NDgxYjA5NDExYTFkNDI5NWM2ZWY3ZDU0ODhhNGUzNTNmNDI0IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKZW5zIFNjaG1pZHQgPGpzY2htaWR0NGdudUB2b2Rh Zm9uZW1haWwuZGU+CkRhdGU6IFN1biwgMTggSnVuIDIwMjMgMTE6NDI6MzUgKzAyMDAKU3Vi amVjdDogW1BBVENIIDEvMl0gVW5kbyBzdWJvcHRpbWFsIGZpeCBmb3IgZG4gbGluZSBwYXJz aW5nCgpUaGUgcHJldmlvdXMgZml4IGZvciBgbGRhcC1zZWFyY2gnIGVycm9yaW5nIG91dCB3 aXRoCmB3cm9uZy10eXBlLWFyZ3VtZW50IGxpc3RwJyBkb2VzIG5vdCBwcm92aWRlIEFQSSBz dGFiaWxpdHkgaW4gYWxsCmNhc2VzLgoqIGxpc3AvbmV0L2xkYXAuZWwgKGxkYXAtc2VhcmNo LWludGVybmFsKTogQmFjayBvdXQgdGhhdCBmaXguCihCdWcjNjQwODkpCi0tLQogbGlzcC9u ZXQvbGRhcC5lbCB8IDEyICstLS0tLS0tLS0tLQogMSBmaWxlIGNoYW5nZWQsIDEgaW5zZXJ0 aW9uKCspLCAxMSBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9saXNwL25ldC9sZGFwLmVs IGIvbGlzcC9uZXQvbGRhcC5lbAppbmRleCA4ODk3YzNiNmQ1NC4uNzg0MDU0MTRhMjggMTAw NjQ0Ci0tLSBhL2xpc3AvbmV0L2xkYXAuZWwKKysrIGIvbGlzcC9uZXQvbGRhcC5lbApAQCAt NzAzLDE3ICs3MDMsNyBAQCBsZGFwLXNlYXJjaC1pbnRlcm5hbAogCSh3aGlsZSAocHJvZ24K IAkJIChza2lwLWNoYXJzLWZvcndhcmQgIiBcdFxuIikKIAkJIChub3QgKGVvYnApKSkKLSAg ICAgICAgICA7OyBJZ25vcmUgZmlyc3QgKGRuKSBsaW5lIGlmIFdJVEhETiBlcXVhbHMgbmls LiAgSWYgV0lUSEROCi0gICAgICAgICAgOzsgaXMgbm9uLW5pbCwgY2hlY2sgc3ludGF4IG9m IHRoZSBsaW5lIGFuZCBzcGxpdCBpdCBpbnRvIGEKLSAgICAgICAgICA7OyBwYWlyIGFzIGV4 cGVjdGVkIGJ5IGBsZGFwLWRlY29kZS1hdHRyaWJ1dGUnIChCdWcjNjQwODkpLgotICAgICAg ICAgIDs7IElmIHRoZSBzeW50YXggaXMgd3JvbmcsIGJldHRlciB0aHJvdyBhbiBlcnJvciBo ZXJlLCBzaW5jZQotICAgICAgICAgIDs7IG90aGVyd2lzZSBgbGRhcC1kZWNvZGUtYXR0cmli dXRlJyB3b3VsZCB0aHJvdyBhIG11Y2ggbGVzcwotICAgICAgICAgIDs7IGNvbXByZWhlbnNp YmxlIGVycm9yIGxhdGVyLgotICAgICAgICAgIChjb25kICgobm90IHdpdGhkbikpCi0gICAg ICAgICAgICAgICAgKChsb29raW5nLWF0ICJkbls9Olx0IF0rXFwoLipcXCkkIikKLSAgICAg ICAgICAgICAgICAgKHNldHEgZG4gKGxpc3QgImRuIiAobWF0Y2gtc3RyaW5nIDEpKSkpCi0g ICAgICAgICAgICAgICAgKHQgKGVycm9yICJJbmNvcnJlY3QgZG4gbGluZSBcIiVzXCIgaW4g bGRhcHNlYXJjaCByZXN1bHQiCi0gICAgICAgICAgICAgICAgICAgICAgICAgIChidWZmZXIt c3Vic3RyaW5nIChwb2ludCkgKGxpbmUtZW5kLXBvc2l0aW9uKSkpKSkKKyAgICAgICAgICAo c2V0cSBkbiAoYnVmZmVyLXN1YnN0cmluZyAocG9pbnQpIChsaW5lLWVuZC1wb3NpdGlvbikp KQogCSAgKGZvcndhcmQtbGluZSAxKQogICAgICAgICAgICh3aGlsZSAobG9va2luZy1hdCAi XlxcKFtBLVphLXpdWy1BLVphLXowLTldKlwKIFxcfFswLTldK1xcKD86XFwuWzAtOV0rXFwp KlxcKVxcKDtbLUEtWmEtejAtOV0rXFwpKls9Olx0IF0rXAotLSAKMi4zMC4yCgo= --------------PvKvqP87aKCgQVEWJDZdwh1f Content-Type: text/x-patch; charset=UTF-8; name="0002-filipp-Do-not-process-dn-entry-with-ldap-decode-attribute.patch" Content-Disposition: attachment; filename*0="0002-filipp-Do-not-process-dn-entry-with-ldap-decode-attribu"; filename*1="te.patch" Content-Transfer-Encoding: base64 RnJvbSAwMjE2NWNkYWY4ODA3ODdiOTlhMDI1M2FlYzExZTA3MmIwNDljM2VmIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKZW5zIFNjaG1pZHQgPGpzY2htaWR0NGdudUB2b2Rh Zm9uZW1haWwuZGU+CkRhdGU6IFN1biwgMTggSnVuIDIwMjMgMTI6MTA6MjkgKzAyMDAKU3Vi amVjdDogW1BBVENIIDIvMl0gRG8gbm90IHByb2Nlc3MgZG4gZW50cnkgd2l0aCBgbGRhcC1k ZWNvZGUtYXR0cmlidXRlJwoKRnVuY3Rpb24gYGxkYXAtc2VhcmNoJyBlcnJvcnMgb3V0IHdp dGggYHdyb25nLXR5cGUtYXJndW1lbnQgbGlzdHAnCndoZW4gY2FsbGVkIHdpdGggV0lUSERO IG5vbi1uaWwuCiogbGlzcC9uZXQvbGRhcC5lbCAobGRhcC1zZWFyY2gpOiBEbyBub3QgcHJv Y2VzcyBmaXJzdCBlbGVtZW50IG9mClJFQ09SRCB3aXRoIGBsZGFwLWRlY29kZS1hdHRyaWJ1 dGUnIGlmIFdJVEhETiBpcyBub24tbmlsLiAgKEJ1ZyM2NDA4OSkKLS0tCiBsaXNwL25ldC9s ZGFwLmVsIHwgOSArKysrKysrLS0KIDEgZmlsZSBjaGFuZ2VkLCA3IGluc2VydGlvbnMoKyks IDIgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC9uZXQvbGRhcC5lbCBiL2xpc3Av bmV0L2xkYXAuZWwKaW5kZXggNzg0MDU0MTRhMjguLjVmNDJmZDZhYzJjIDEwMDY0NAotLS0g YS9saXNwL25ldC9sZGFwLmVsCisrKyBiL2xpc3AvbmV0L2xkYXAuZWwKQEAgLTQ4Nyw4ICs0 ODcsMTMgQEAgbGRhcC1zZWFyY2gKICAgICAoaWYgbGRhcC1pZ25vcmUtYXR0cmlidXRlLWNv ZGluZ3MKIAlyZXN1bHQKICAgICAgIChtYXBjYXIgKGxhbWJkYSAocmVjb3JkKQotCQkobWFw Y2FyICMnbGRhcC1kZWNvZGUtYXR0cmlidXRlIHJlY29yZCkpCi0JICAgICAgcmVzdWx0KSkp KQorICAgICAgICAgICAgICAgIDs7IERvIG5vdCBwcm9jZXNzIGZpcnN0IGVsZW1lbnQgb2Yg UkVDT1JEIHdpdGgKKyAgICAgICAgICAgICAgICA7OyBgbGRhcC1kZWNvZGUtYXR0cmlidXRl JyBpZiBXSVRIRE4gaXMgbm9uLW5pbC4KKyAgICAgICAgICAgICAgICA7OyAoQnVnIzY0MDg5 KQorICAgICAgICAgICAgICAgIChhcHBlbmQgKGFuZCB3aXRoZG4gKGxpc3QgKGNhciByZWNv cmQpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgIChtYXBjYXIgIydsZGFwLWRlY29kZS1h dHRyaWJ1dGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGlmIHdpdGhkbiAo Y2RyIHJlY29yZCkgcmVjb3JkKSkpKQorICAgICAgICAgICAgICByZXN1bHQpKSkpCiAKIChk ZWZ1biBsZGFwLXBhc3N3b3JkLXJlYWQgKGhvc3QpCiAgICJSZWFkIExEQVAgcGFzc3dvcmQg Zm9yIEhPU1QuCi0tIAoyLjMwLjIKCg== --------------PvKvqP87aKCgQVEWJDZdwh1f Content-Type: text/x-patch; charset=UTF-8; name="0002-jschmidt-Do-not-process-dn-entry-with-ldap-decode-attribute.patch" Content-Disposition: attachment; filename*0="0002-jschmidt-Do-not-process-dn-entry-with-ldap-decode-attri"; filename*1="bute.patch" Content-Transfer-Encoding: base64 RnJvbSBjOWNlMTVmNTJiNjFiNTVmYTk2NTViODFmYjk5ZmY3YjUwOTUwMDFjIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKZW5zIFNjaG1pZHQgPGpzY2htaWR0NGdudUB2b2Rh Zm9uZW1haWwuZGU+CkRhdGU6IFN1biwgMTggSnVuIDIwMjMgMTI6MzI6NTQgKzAyMDAKU3Vi amVjdDogW1BBVENIIDIvMl0gRG8gbm90IHByb2Nlc3MgZG4gZW50cnkgd2l0aCBgbGRhcC1k ZWNvZGUtYXR0cmlidXRlJwoKRnVuY3Rpb24gYGxkYXAtc2VhcmNoJyBlcnJvcnMgb3V0IHdp dGggYHdyb25nLXR5cGUtYXJndW1lbnQgbGlzdHAnCndoZW4gY2FsbGVkIHdpdGggV0lUSERO IG5vbi1uaWwuCiogbGlzcC9uZXQvbGRhcC5lbCAobGRhcC1zZWFyY2gpOiBEbyBub3QgcHJv Y2VzcyBmaXJzdCBlbGVtZW50IG9mClJFQ09SRCB3aXRoIGBsZGFwLWRlY29kZS1hdHRyaWJ1 dGUnIGlmIFdJVEhETiBpcyBub24tbmlsLiAgKEJ1ZyM2NDA4OSkKLS0tCiBsaXNwL25ldC9s ZGFwLmVsIHwgMTggKysrKysrKysrKysrKystLS0tCiAxIGZpbGUgY2hhbmdlZCwgMTQgaW5z ZXJ0aW9ucygrKSwgNCBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9saXNwL25ldC9sZGFw LmVsIGIvbGlzcC9uZXQvbGRhcC5lbAppbmRleCA3ODQwNTQxNGEyOC4uMTI2OWRiOTA4ZDcg MTAwNjQ0Ci0tLSBhL2xpc3AvbmV0L2xkYXAuZWwKKysrIGIvbGlzcC9uZXQvbGRhcC5lbApA QCAtNDg0LDExICs0ODQsMjEgQEAgbGRhcC1zZWFyY2gKICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgYXR0cnNvbmx5ICxhdHRyc29ubHkKICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aGRuICx3aXRoZG4KICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLEBob3N0LXBsaXN0KSkpKQotICAg IChpZiBsZGFwLWlnbm9yZS1hdHRyaWJ1dGUtY29kaW5ncwotCXJlc3VsdAorICAgIChjb25k CisgICAgIChsZGFwLWlnbm9yZS1hdHRyaWJ1dGUtY29kaW5ncworICAgICAgcmVzdWx0KQor ICAgICAod2l0aGRuCisgICAgICA7OyBEbyBub3QgcHJvY2VzcyBmaXJzdCBlbGVtZW50IG9m IFJFQ09SRCB3aXRoCisgICAgICA7OyBgbGRhcC1kZWNvZGUtYXR0cmlidXRlJyBpZiBXSVRI RE4gaXMgbm9uLW5pbC4gKEJ1ZyM2NDA4OSkKICAgICAgIChtYXBjYXIgKGxhbWJkYSAocmVj b3JkKQotCQkobWFwY2FyICMnbGRhcC1kZWNvZGUtYXR0cmlidXRlIHJlY29yZCkpCi0JICAg ICAgcmVzdWx0KSkpKQorICAgICAgICAgICAgICAgIChjb25zIChjYXIgcmVjb3JkKQorICAg ICAgICAgICAgICAgICAgICAgIChtYXBjYXIgIydsZGFwLWRlY29kZS1hdHRyaWJ1dGUKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjZHIgcmVjb3JkKSkpKQorICAgICAgICAg ICAgICByZXN1bHQpKQorICAgICAodAorICAgICAgKG1hcGNhciAobGFtYmRhIChyZWNvcmQp CisgICAgICAgICAgICAgICAgKG1hcGNhciAjJ2xkYXAtZGVjb2RlLWF0dHJpYnV0ZSByZWNv cmQpKQorICAgICAgICAgICAgICByZXN1bHQpKSkpKQogCiAoZGVmdW4gbGRhcC1wYXNzd29y ZC1yZWFkIChob3N0KQogICAiUmVhZCBMREFQIHBhc3N3b3JkIGZvciBIT1NULgotLSAKMi4z MC4yCgo= --------------PvKvqP87aKCgQVEWJDZdwh1f-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 19 10:27:16 2023 Received: (at 64089) by debbugs.gnu.org; 19 Jun 2023 14:27:16 +0000 Received: from localhost ([127.0.0.1]:56941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBFqd-0000o3-Ud for submit@debbugs.gnu.org; Mon, 19 Jun 2023 10:27:16 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:54235) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBFqb-0000no-Te for 64089@debbugs.gnu.org; Mon, 19 Jun 2023 10:27:14 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C78F35C02C2; Mon, 19 Jun 2023 10:27:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 19 Jun 2023 10:27:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1687184828; x=1687271228; bh=wE Ek7dhl647H+3/qdZ4amdTep3PY8VJlac51/+Wyt4I=; b=qfdgEXlq0IfBEwb29m t32G+we3L6hvP9u9kGUpSk3Ewd2yze7edr/kt/LvukSE7aOweRFe1apXYH7S/4j+ gJPbGpq9m2sba3Mf9XH7XudgcefJkuDDyhLgaruDeJcfj0Gxv0r3YGMJ/PWXZXLx sbei2pdDOUeej15nEnU0g1xTh7zz4urTV+RXL2pxDqVSFxmo8YGVjexyfv2GmdyD TUFaYeSfajDUCprCo6P1tgVbBK1G+7gA/jQz5Av4s66ufC2zk2CewwCPqViYKR4y RQbLget+lHbrtWfvabDUkUQftfVrszdcExxWq7RqCXpDcXrE+wkr9dDgnrqBzaOT SJQA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1687184828; x=1687271228; bh=wEEk7dhl647H+ 3/qdZ4amdTep3PY8VJlac51/+Wyt4I=; b=VWWyrAV3Nm6Q6xXAfiFlnIn96w62V 7q9GW68W5dYpikieXgTaZzDm7r8MgZrlheQJY2Lk0p2CzmFZOhLEUFwTUB1Z70eJ bmiA5URZ+s0FzZf7Ap/3wfiHAK5ugyCnGRwlVtt53qUD4Zv64JNGIEHoBaFwcTSd nbl44jq2p7BnI7cxiwvAxOcK5ZLzvdlm0t8B7WpKWH8IPnVoinA4LhHEoGsriAez zN5eQgFln2fyAjUvkWxEDmfecAkftP1BLXgicf129iLztV8rGb6+M+YlQJQpkaie TwgvgVOfZr20vjBQB/elJ8bJVebU+l+SiE73dl4Dr8TUsYdIN4Q8q9IBQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgeefvddgjeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefujghffgffkfggtgesthdtredttdertdenucfhrhhomhephfhilhhi phhpucfiuhhnsghinhcuoehfghhunhgsihhnsehfrghsthhmrghilhdrfhhmqeenucggtf frrghtthgvrhhnpeffhfejveeiieeiudetgfehffelieevfeeffedtkeelheeludefueeu udehveeiffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehfghhunhgsihhnsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Feedback-ID: id48c41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 19 Jun 2023 10:27:07 -0400 (EDT) From: Filipp Gunbin To: Eli Zaretskii Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t In-Reply-To: <83mt0xpcns.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 18 Jun 2023 08:22:47 +0300") References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> <83mt0xpcns.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Mon, 19 Jun 2023 17:27:05 +0300 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 64089 Cc: jschmidt4gnu@vodafonemail.de, 64089@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 18/06/2023 08:22 +0300, Eli Zaretskii wrote: >> Date: Sun, 18 Jun 2023 02:14:31 +0300 >> From: "Filipp Gunbin" >> Cc: 64089@debbugs.gnu.org, monnier@iro.umontreal.ca >> >> Thanks, but the problem is that >> >> - the code before the fix prepended dn as string (and it's not >> totally broken - you can skip attribute translation via >> var/defcustom, in which case the error should not be triggered) >> - the fix on emacs-29 now prepends it as cons cell >> - my change on master will again use string form >> >> So I'd prefer that we leave that unfixed on emacs-29 instead of >> creating this mess.. Or correct cons cell -> string, if it's worth >> the trouble. > > Sorry, I don't understand why we'd like to leave it unfixed. Please > elaborate. In particular, it is entirely legitimate for master to > have a different solution. Hi Eli, this is what I meant: Previously ldap-search withdn=t returned: (("" ("mail" "..."))) But now it will return: ((("dn" "") ("mail" "..."))) Filipp From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 19 13:25:04 2023 Received: (at 64089) by debbugs.gnu.org; 19 Jun 2023 17:25:04 +0000 Received: from localhost ([127.0.0.1]:57209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBIch-0006AO-OE for submit@debbugs.gnu.org; Mon, 19 Jun 2023 13:25:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBIce-00069n-P1 for 64089@debbugs.gnu.org; Mon, 19 Jun 2023 13:25:01 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBIcY-0004Lj-AW; Mon, 19 Jun 2023 13:24:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=CWfo1LWLTWEvqiUiSfSvusHxm/LO11clXWS/3RO3PYw=; b=BThXVWFZIuZE YGA/uMKEfXzzjjc3wBVBhGZzp1ZN/JgrOkjGX7UoC//aS/1Y9bgAw7suTVSZJQdomBjZvW7aHAQ6e qzknPsMhflQ1sEEveEloxYKQYdYDh+pTSp+t2V2OImvVq6L0RIHN62jvjjERQa69bTB4xQUFAZT4W Lb9nUwEPwDjCSp7Syp17JtDjXx++iaSOLYI2ypoenP/8bHy0qh4AGRfSOaeo7XbDtW0MnbJvBp6wC szP7uC0MbJCuE9D5c9xJVdJ4J496BdY7UNApIpAj0kBceV8N223mjnYNYEe7+OL9+do5g86i51iY5 SPZL0qH3jCAokObXZAGA8Q==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBIcX-0001mT-Pt; Mon, 19 Jun 2023 13:24:54 -0400 Date: Mon, 19 Jun 2023 20:24:58 +0300 Message-Id: <83r0q774b9.fsf@gnu.org> From: Eli Zaretskii To: Filipp Gunbin In-Reply-To: (message from Filipp Gunbin on Mon, 19 Jun 2023 17:27:05 +0300) Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> <83mt0xpcns.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64089 Cc: jschmidt4gnu@vodafonemail.de, 64089@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Filipp Gunbin > Cc: 64089@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de, > monnier@iro.umontreal.ca > Date: Mon, 19 Jun 2023 17:27:05 +0300 > > On 18/06/2023 08:22 +0300, Eli Zaretskii wrote: > > >> Date: Sun, 18 Jun 2023 02:14:31 +0300 > >> From: "Filipp Gunbin" > >> Cc: 64089@debbugs.gnu.org, monnier@iro.umontreal.ca > >> > >> Thanks, but the problem is that > >> > >> - the code before the fix prepended dn as string (and it's not > >> totally broken - you can skip attribute translation via > >> var/defcustom, in which case the error should not be triggered) > >> - the fix on emacs-29 now prepends it as cons cell > >> - my change on master will again use string form > >> > >> So I'd prefer that we leave that unfixed on emacs-29 instead of > >> creating this mess.. Or correct cons cell -> string, if it's worth > >> the trouble. > > > > Sorry, I don't understand why we'd like to leave it unfixed. Please > > elaborate. In particular, it is entirely legitimate for master to > > have a different solution. > > Hi Eli, this is what I meant: > > Previously ldap-search withdn=t returned: > > (("" ("mail" "..."))) > > But now it will return: > > ((("dn" "") ("mail" "..."))) In which situations will the current code cause trouble, where the original code didn't? From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 19 14:38:31 2023 Received: (at 64089) by debbugs.gnu.org; 19 Jun 2023 18:38:31 +0000 Received: from localhost ([127.0.0.1]:57289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBJln-00089m-5V for submit@debbugs.gnu.org; Mon, 19 Jun 2023 14:38:31 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:58807) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBJll-00089Z-Fl for 64089@debbugs.gnu.org; Mon, 19 Jun 2023 14:38:30 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 65A465C035A; Mon, 19 Jun 2023 14:38:24 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 19 Jun 2023 14:38:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1687199904; x=1687286304; bh=A0 0dnisS0cLngmhmnsB9mXRmfNgdB1FlOiE5OZZhcAI=; b=UKKkFKLcWuHcdV+2qE +kRcwM8KOKUsvrrrMLOPnFpZjwD1q7dDok+LUABHeM6nyFJOJw2v2BSPg2ZyIdYC yjcZSy1fw3UzGRsBhjwS1ZkObapWWfb7UHPNbSc0lpiRYHUyWePwQdVW1wdypiWD l3SU8HR1pVmxCvEFth5GgoZrvty79B8qKJRrTNNlXt2gGBj5FjNK5Qx54EvEc0+9 3PI2IBXcIT7ZZVLFzia3gZLgdkqWswXokozAfxWKsW+0/QyE2bzExfBaDWPqR2d7 i5X2V8S1jC2tO3+/qta2dQzQN3xr46s/u4vweZr/fMmIfgWr5o3gGGCfJ/dx/Qb7 wUgQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1687199904; x=1687286304; bh=A00dnisS0cLng mhmnsB9mXRmfNgdB1FlOiE5OZZhcAI=; b=ZneXvNoqqol7uiub0ktXlH1uMbxMi Pp6x+WidVmB90AQXg/d/2jUYRkLSsEZ9WzdhZs+pSkNITKqqujt62tSoxk/z6CAW 8xa//cnGtNClpsjUNVCz2vnwnrNYf9rhBFW+QIAUqWqEXzwdqllKb21Rl8xX9yvN yuzvQGTQmqj48TMpVFIj5d2+ftThbLh7FB2TSph7Pgp9Q2ctEPCCGi5BOLwMB8LG mzq8I6Kdtc/ZuGHXLGjXfpVArTauxtsL6TQ5ThwnUCOpLmB+PEgg06+YXZhhYeWV y//apt1a31repDOwIFqZ1wx+ck0xd5YlYbyab1r4YFOf91JaLZB2LqMLQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgeefvddguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufgjfhgffffkgggtsehttdertddtredtnecuhfhrohhmpefhihhl ihhpphcuifhunhgsihhnuceofhhguhhnsghinhesfhgrshhtmhgrihhlrdhfmheqnecugg ftrfgrthhtvghrnhepfffhjeevieeiiedutefgheffleeiveeffeeftdekleehledufeeu ueduheevieffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepfhhguhhnsghinhesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: id48c41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 19 Jun 2023 14:38:22 -0400 (EDT) From: Filipp Gunbin To: Eli Zaretskii Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t In-Reply-To: <83r0q774b9.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 19 Jun 2023 20:24:58 +0300") References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> <83mt0xpcns.fsf@gnu.org> <83r0q774b9.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Mon, 19 Jun 2023 21:38:19 +0300 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 64089 Cc: jschmidt4gnu@vodafonemail.de, 64089@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 19/06/2023 20:24 +0300, Eli Zaretskii wrote: >> From: Filipp Gunbin >> Cc: 64089@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de, >> monnier@iro.umontreal.ca >> Date: Mon, 19 Jun 2023 17:27:05 +0300 >> >> On 18/06/2023 08:22 +0300, Eli Zaretskii wrote: >> >> >> Date: Sun, 18 Jun 2023 02:14:31 +0300 >> >> From: "Filipp Gunbin" >> >> Cc: 64089@debbugs.gnu.org, monnier@iro.umontreal.ca >> >> >> >> Thanks, but the problem is that >> >> >> >> - the code before the fix prepended dn as string (and it's not >> >> totally broken - you can skip attribute translation via >> >> var/defcustom, in which case the error should not be triggered) >> >> - the fix on emacs-29 now prepends it as cons cell >> >> - my change on master will again use string form >> >> >> >> So I'd prefer that we leave that unfixed on emacs-29 instead of >> >> creating this mess.. Or correct cons cell -> string, if it's worth >> >> the trouble. >> > >> > Sorry, I don't understand why we'd like to leave it unfixed. Please >> > elaborate. In particular, it is entirely legitimate for master to >> > have a different solution. >> >> Hi Eli, this is what I meant: >> >> Previously ldap-search withdn=t returned: >> >> (("" ("mail" "..."))) >> >> But now it will return: >> >> ((("dn" "") ("mail" "..."))) > > In which situations will the current code cause trouble, where the > original code didn't? The above formats are what ldap-search returns when given withdn=t. Emacs codebase doesn't use withdn=t at all, but ldap-search is a "public" API function, and we're not supposed to change its return format? From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 19 15:09:08 2023 Received: (at 64089) by debbugs.gnu.org; 19 Jun 2023 19:09:08 +0000 Received: from localhost ([127.0.0.1]:57315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBKFQ-0000cd-0U for submit@debbugs.gnu.org; Mon, 19 Jun 2023 15:09:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBKFO-0000bz-2B for 64089@debbugs.gnu.org; Mon, 19 Jun 2023 15:09:07 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBKFH-0006iO-2y; Mon, 19 Jun 2023 15:08:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=HeK/OksBTUkgCNGfQAxFfnBWxAdSVixBO82xUSon0l4=; b=k9B072LOdybW 7K9wDHenzLmvxQcwAvr3yVY8LgkuaswrT23OObM8LIEof2hI4oWUgrr7yfof1xo0ha9jAVgowQ5Kz kWTQfNM//BD7w9o02BfLX3+GzZy/Vf6fW3tSkKPFkhHudVgAgk5WhgUdQQeCVvXiTe+rYaLdYKhqp 1QQzYdek1LXAx0ng90hxizhS6Nfb4EZ7O/b/7NBKlMx9QN7Nqn98D+XhUcWVEvOWgCkikbbJ1slyf EvuwQhRmyPrSqwyrPdMRuc1bbTDaJh4yOvBAHp7PktNlnPCHngae1XOo6XzYwosDUtPVpY+SJl9va yMORylt8beSjUgNPHH9XMg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBKFG-0005KF-Ji; Mon, 19 Jun 2023 15:08:58 -0400 Date: Mon, 19 Jun 2023 22:09:03 +0300 Message-Id: <83ilbj6zhs.fsf@gnu.org> From: Eli Zaretskii To: Filipp Gunbin In-Reply-To: (message from Filipp Gunbin on Mon, 19 Jun 2023 21:38:19 +0300) Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> <83mt0xpcns.fsf@gnu.org> <83r0q774b9.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64089 Cc: jschmidt4gnu@vodafonemail.de, 64089@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Filipp Gunbin > Cc: 64089@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de, > monnier@iro.umontreal.ca > Date: Mon, 19 Jun 2023 21:38:19 +0300 > > On 19/06/2023 20:24 +0300, Eli Zaretskii wrote: > > >> Previously ldap-search withdn=t returned: > >> > >> (("" ("mail" "..."))) > >> > >> But now it will return: > >> > >> ((("dn" "") ("mail" "..."))) > > > > In which situations will the current code cause trouble, where the > > original code didn't? > > The above formats are what ldap-search returns when given withdn=t. > > Emacs codebase doesn't use withdn=t at all, but ldap-search is a "public" > API function, and we're not supposed to change its return format? Where is its return format documented for the withdn=t case? From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 19 15:27:12 2023 Received: (at 64089) by debbugs.gnu.org; 19 Jun 2023 19:27:12 +0000 Received: from localhost ([127.0.0.1]:57326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBKWu-00018C-84 for submit@debbugs.gnu.org; Mon, 19 Jun 2023 15:27:12 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:37267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBKWs-00017v-58 for 64089@debbugs.gnu.org; Mon, 19 Jun 2023 15:27:10 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1DCE75C0360; Mon, 19 Jun 2023 15:27:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 19 Jun 2023 15:27:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1687202825; x=1687289225; bh=IE BcJksSdDd45d4VIakV6McYEJcA5j3t3w3vOu8rm4s=; b=FjVJPJaZheU6X/NdzR IXZojb3AbKEZz/VOfYaRozKDcsEX9RA2YmFay2NzuESJeDJnXmZbikZrNVMY9YGs EvFVcwfQ4TCPwT8aq25bgGGI0GL+qYQMqwiAhQcBv6OYXgZIQT62cD7INdP6NFvs qTQfm7LBZiYF9//sDIl1m78p3Vha+n9Qa9ZGJnaDGHGxfROBc+QNLjlkqsU+t1GX ZP9Hd0ZXalzA9dxzfR+LgorwaZWcbo3KGHcN+musZSo/CODA6DuzD+hqHllKOZqm ynRaNPh4Saa3zgXjS95lvTLzRGcMtVqU3rrHP3d7QVDKXCjlQtcjQcZ57WgEZTna FDlg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1687202825; x=1687289225; bh=IEBcJksSdDd45 d4VIakV6McYEJcA5j3t3w3vOu8rm4s=; b=W3g6ZIcSo0VAx/IO/wPIHQlJ1vAHg hadlf60uqYymkIIiMy5X4+DbjRRngIGmAr3QreSKOfqRSGE6yb/Cnt43lSWZRxCT XmDP/ojZeIXgNZ21RMNFdsnXh1gjebQR/Q3vh6kKfomJsq7nJgEtWopR6HWFo+PI b2wHs2kXAmuGCkIcAYzErKmi+KEw/aTNB3p5MA1SjaQaBRpYeTzOFAO+43hked3n uymTzZroUTbHje/esu0HWJpEOnt+qBtZatwSvpAE5gPPLCud0DMO7jcTm3xZ0de8 CQaxaOOJf1eaMJX+Lojw4csQ3o3/+YURYG8FxgmYNE7G7jh4RrcDo+54A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgeefvddgudefhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufgjfhgffffkgggtsehttdertddtredtnecuhfhrohhmpefhihhl ihhpphcuifhunhgsihhnuceofhhguhhnsghinhesfhgrshhtmhgrihhlrdhfmheqnecugg ftrfgrthhtvghrnhepfffhjeevieeiiedutefgheffleeiveeffeeftdekleehledufeeu ueduheevieffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepfhhguhhnsghinhesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: id48c41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 19 Jun 2023 15:27:03 -0400 (EDT) From: Filipp Gunbin To: Eli Zaretskii Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t In-Reply-To: <83ilbj6zhs.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 19 Jun 2023 22:09:03 +0300") References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> <83mt0xpcns.fsf@gnu.org> <83r0q774b9.fsf@gnu.org> <83ilbj6zhs.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Mon, 19 Jun 2023 22:27:01 +0300 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 64089 Cc: jschmidt4gnu@vodafonemail.de, 64089@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 19/06/2023 22:09 +0300, Eli Zaretskii wrote: >> From: Filipp Gunbin >> Cc: 64089@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de, >> monnier@iro.umontreal.ca >> Date: Mon, 19 Jun 2023 21:38:19 +0300 >> >> On 19/06/2023 20:24 +0300, Eli Zaretskii wrote: >> >> >> Previously ldap-search withdn=t returned: >> >> >> >> (("" ("mail" "..."))) >> >> >> >> But now it will return: >> >> >> >> ((("dn" "") ("mail" "..."))) >> > >> > In which situations will the current code cause trouble, where the >> > original code didn't? >> >> The above formats are what ldap-search returns when given withdn=t. >> >> Emacs codebase doesn't use withdn=t at all, but ldap-search is a "public" >> API function, and we're not supposed to change its return format? > > Where is its return format documented for the withdn=t case? The docstring only says "If WITHDN is non-nil, each entry in the result will be prepended with its distinguished name WITHDN.", so nowhere, which looks like an omission. Still, returning it as string makes more sense, because: 1) That's how it worked before the change. 2) It basically makes the result an alist with elements "(id . attrs)" (dn is a kind of id in ldap). 3) Including dn as attribute, with name, is redundand - the client requesting withdn=t already knows the name "dn". Honestly, I don't get why we need to evaluate this breakage separately, while the others are not allowed, at least without good reason... Btw, the patch on emacs-29 also doesn't work (at least for me) because in the end of the output, there's an additional line "Process ldapsearch finished", which gets parsed as dn (as start of new ldap record). So the error happens, just in another place. I accounted for that in my patch. Thanks. Filipp From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 19 16:15:47 2023 Received: (at 64089) by debbugs.gnu.org; 19 Jun 2023 20:15:47 +0000 Received: from localhost ([127.0.0.1]:57371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBLHg-0002V4-4b for submit@debbugs.gnu.org; Mon, 19 Jun 2023 16:15:47 -0400 Received: from mr3.vodafonemail.de ([145.253.228.163]:41774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBLHd-0002Um-P3 for 64089@debbugs.gnu.org; Mon, 19 Jun 2023 16:15:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1687205724; bh=4gTN9zTwWVfngUr0ckCp6AENaUELqt5HdSrL6tIr1gU=; h=Message-ID:Date:User-Agent:Subject:To:References:Content-Language: From:In-Reply-To:Content-Type:From; b=Qe4RgphGz3j81asPP+XZzzZFxtkaVT9Ruk+UEo2qvYmFwUKSM6tHs2ttdKXKkaklJ hhEsIzqO0DxneKnn2lhPhczAihsKN6FVAzUp5vy54tWD4I2IJwgZ1/P9L2+i3Z0srd 3YHNvmAPlRWDmx7gvDCRgHjq381ldCOB8iRTX9rA= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr3.vodafonemail.de (Postfix) with ESMTPS id 4QlLbw0Ng3z24St; Mon, 19 Jun 2023 20:15:24 +0000 (UTC) Received: from [192.168.178.41] (port-92-194-184-218.dynamic.as20676.net [92.194.184.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4QlLbf2pcxzMm7K; Mon, 19 Jun 2023 20:15:07 +0000 (UTC) Message-ID: <43af5169-e9f5-e720-ffd5-e30f5c52da81@vodafonemail.de> Date: Mon, 19 Jun 2023 22:15:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t To: Filipp Gunbin , Eli Zaretskii References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> <83mt0xpcns.fsf@gnu.org> <83r0q774b9.fsf@gnu.org> <83ilbj6zhs.fsf@gnu.org> Content-Language: de-DE-frami, en-US From: Jens Schmidt In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-purgate-type: clean X-purgate: clean X-purgate-size: 1006 X-purgate-ID: 155817::1687205719-4A7AE023-25F60D53/0/0 X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 64089 Cc: 64089@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 2023-06-19 21:27, Filipp Gunbin wrote: > 3) Including dn as attribute, with name, is redundand - the client > requesting withdn=t already knows the name "dn". Not true if your query returns more than one record. > Honestly, I don't get why we need to evaluate this breakage separately, > while the others are not allowed, at least without good reason... I don't think we should piggy-back too many problems on one report ... > Btw, the patch on emacs-29 also doesn't work (at least for me) because > in the end of the output, there's an additional line "Process ldapsearch > finished", which gets parsed as dn (as start of new ldap record). ... in particular this is a completely new one and does not have to do anything with my issue. On what platform are you testing? To summarize: My latest patch for emacs-29 on a different branch of this thread fixes my issue while keeping results for the working cases unchanged - that is what you have been asking for, no? From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 19 16:35:20 2023 Received: (at 64089) by debbugs.gnu.org; 19 Jun 2023 20:35:20 +0000 Received: from localhost ([127.0.0.1]:57391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBLaq-00033s-9c for submit@debbugs.gnu.org; Mon, 19 Jun 2023 16:35:20 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:38143) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBLao-00033e-24 for 64089@debbugs.gnu.org; Mon, 19 Jun 2023 16:35:19 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 01EB65C026F; Mon, 19 Jun 2023 16:35:13 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 19 Jun 2023 16:35:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1687206912; x=1687293312; bh=cq v2wKzxXz2Kg7oVxVD67by7mUjUYoLgNY/4K2mNuOQ=; b=R3uMov+TeojvgKsPk3 ZBenUi2dq4Rqwc+oRMOzfiUPTYVYO6wm8LfOfGKCGjwfWkxSQZysc5NMgdgJaX03 co64ItjQbXVOOR4JnsRTI+hOZcpccWeKFvkQlAdqInShR26kVASCyx8k95P7miAV /zz6fbsOgc72AH4Nndjq34aIN1lelGBgjSYQGqY9LohyU0K1LlksDiaaCR/6K88z lHoendLS7JUHoCa3llmV1YrzPinlTedCS7yaWMgShvRR1IMEFzm2GhHtJvr5feBu axoVcayYGft44P3KvsaH4E1zoCnIc1zONpgsx//27NSPxOTUm0II84cmBFl1XE0c bbNA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1687206912; x=1687293312; bh=cqv2wKzxXz2Kg 7oVxVD67by7mUjUYoLgNY/4K2mNuOQ=; b=aZvDYSBZ3QMI8DyE/kSgx0LGTeCcg 3lpqiDuCz68LdNCUPp8XwWVYZxC3tTtRnVSjeUUFAsNs0m7jqHOGYVyaYZDXvIBL O6XkBXRVcMWHlrsBRyM3dnxKX5/lvWO4wNEDXAHY6Y0mJGOcLeGMgcoJgdofG6Br LfnWTNzr/1LirKG+WvCfYyfWYx6zePIZdAXkwpt7pZAcLf3kQIlnLOFh6PWXyO4p zesjSbXCox1ekbQdcZm5E+Lk8pDbEt4eUg5mlPLtzg+LeLKBBe3pM1s5VW0VmLiy 3/poAUDPY5nx9GDSwViN/cIBOJrPK6fp2aD/BrKDccyx5wzfHksiV0Ykw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgeefvddgudeglecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufgjfhgffffkgggtsehttdertddtredtnecuhfhrohhmpefhihhl ihhpphcuifhunhgsihhnuceofhhguhhnsghinhesfhgrshhtmhgrihhlrdhfmheqnecugg ftrfgrthhtvghrnhepfffhjeevieeiiedutefgheffleeiveeffeeftdekleehledufeeu ueduheevieffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepfhhguhhnsghinhesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: id48c41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 19 Jun 2023 16:35:11 -0400 (EDT) From: Filipp Gunbin To: Jens Schmidt Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t In-Reply-To: <43af5169-e9f5-e720-ffd5-e30f5c52da81@vodafonemail.de> (Jens Schmidt's message of "Mon, 19 Jun 2023 22:15:02 +0200") References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> <83mt0xpcns.fsf@gnu.org> <83r0q774b9.fsf@gnu.org> <83ilbj6zhs.fsf@gnu.org> <43af5169-e9f5-e720-ffd5-e30f5c52da81@vodafonemail.de> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Mon, 19 Jun 2023 23:35:08 +0300 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 64089 Cc: Eli Zaretskii , 64089@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Jens, On 19/06/2023 22:15 +0200, Jens Schmidt wrote: > On 2023-06-19 21:27, Filipp Gunbin wrote: > >> 3) Including dn as attribute, with name, is redundand - the client >> requesting withdn=t already knows the name "dn". > > Not true if your query returns more than one record. I mean not the dn value (distinct for each record), but the string "dn" itself. The client already knows that "dn" attribute (that is, a kind of id) will be prepended to a record, so naming it explicitly, and including into the attributes list, is not that useful (and least it's not what the original code meant). >> Honestly, I don't get why we need to evaluate this breakage separately, >> while the others are not allowed, at least without good reason... > > I don't think we should piggy-back too many problems on one report ... I don't understand what you mean here.. >> Btw, the patch on emacs-29 also doesn't work (at least for me) because >> in the end of the output, there's an additional line "Process ldapsearch >> finished", which gets parsed as dn (as start of new ldap record). > > ... in particular this is a completely new one and does not have to do > anything with my issue. On what platform are you testing? I'm on macOS, OpenLDAP 2.6.4_1 from macports. However, this string is appended by Emacs itself. > To summarize: My latest patch for emacs-29 on a different branch of > this thread fixes my issue while keeping results for the working cases > unchanged - that is what you have been asking for, no? I still stand by opinion that we should not touch emacs-29 here, due to reasons I described in other messages. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 19 17:37:48 2023 Received: (at 64089) by debbugs.gnu.org; 19 Jun 2023 21:37:48 +0000 Received: from localhost ([127.0.0.1]:57443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBMZH-0004tE-Ui for submit@debbugs.gnu.org; Mon, 19 Jun 2023 17:37:48 -0400 Received: from mr6.vodafonemail.de ([145.253.228.166]:42912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBMZG-0004t1-FA for 64089@debbugs.gnu.org; Mon, 19 Jun 2023 17:37:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1687210661; bh=mMRWUbaUn4/8NljaVGv6Z7T1JYVHFy55UXjP8LT70zs=; h=Message-ID:Date:User-Agent:Subject:Content-Language:To:References: From:In-Reply-To:Content-Type:From; b=JWBmH1NahRXrVuKubD1LW/ndXn6/2YlrU9kR34PcZt3uSxLn1Ithb2dhj4MiQhK7m nQoN9k3KnnEu3XUliEUZCzOGTM//WNNJEpQGZ4noDoPbs9YGVS7PtpIcCWGnT3w6sM uX5JbwkuTbs7I1dt02CTgwcB1236VjMObm3F22rQ= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr6.vodafonemail.de (Postfix) with ESMTPS id 4QlNQr685cz1xxm; Mon, 19 Jun 2023 21:37:40 +0000 (UTC) Received: from [192.168.178.41] (port-92-194-184-218.dynamic.as20676.net [92.194.184.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4QlNQb0xQBzHnHg; Mon, 19 Jun 2023 21:37:23 +0000 (UTC) Message-ID: <6f9d69f6-13c1-ae74-45ff-7896c97e1fc2@vodafonemail.de> Date: Mon, 19 Jun 2023 23:37:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t Content-Language: de-DE-frami, en-US To: Filipp Gunbin References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> <83mt0xpcns.fsf@gnu.org> <83r0q774b9.fsf@gnu.org> <83ilbj6zhs.fsf@gnu.org> <43af5169-e9f5-e720-ffd5-e30f5c52da81@vodafonemail.de> From: Jens Schmidt In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-purgate-type: clean X-purgate: clean X-purgate-size: 1088 X-purgate-ID: 155817::1687210656-EA7F80CB-43D5C386/0/0 X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 64089 Cc: Eli Zaretskii , 64089@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) Hi Filipp, On 2023-06-19 22:35, Filipp Gunbin wrote: > I mean not the dn value (distinct for each record), but the string "dn" > itself. misunderstood you here. I agree that the prefix "dn: " is not very meaningful but somebody might have coded around that already. >> I don't think we should piggy-back too many problems on one report > > I don't understand what you mean here.. Just that there are lot of issues that we're discussing here, where there was initially only one. > I'm on macOS, OpenLDAP 2.6.4_1 from macports. However, this string is > appended by Emacs itself. But that sounds like a bug that should better be fixed elsewhere, I think. Emacs shouldn't append text to process output unless explicitly having been asked for that. > I still stand by opinion that we should not touch emacs-29 here, due to > reasons I described in other messages. I leave that at Eli's discretion - I have provided separate patches to back out my changes and to fix the one issue I initially had in the direction I thought you pointed me. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 20 07:01:34 2023 Received: (at 64089) by debbugs.gnu.org; 20 Jun 2023 11:01:34 +0000 Received: from localhost ([127.0.0.1]:58170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBZ78-0001wc-8D for submit@debbugs.gnu.org; Tue, 20 Jun 2023 07:01:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBZ76-0001wP-0s for 64089@debbugs.gnu.org; Tue, 20 Jun 2023 07:01:33 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBZ70-0001Wr-15; Tue, 20 Jun 2023 07:01:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=rUSiScNgPpP2xfmnPNylYfJDZVJjr1Ap+5WzjQblb2c=; b=aQWS9wMkY96P nnlZERXmDCGBuhvGhNJKVWLKNZWKLrD8963ntD7fxlX1/iYQ3Ldn7CNgnQVruwqTPcQ3+GKgKI7Se M1kZVBaRb3q+TIF/1wN21t7JT+GIL7pmbe3gHfIyrVboXmB6+ibjRuMecEsy0dsZMK7KUbj6f2Vw8 +ApCZvbUZ08yaG0vSMs02z0mtcYCPF4zSwh3out2VXBR1KNV5f+o3d97FFnzlAROzYVqs9sUCVTVa L/FC5+F6kZNSuJaTiYaNtVmCEc2kd+i6gy9i432X8eAoKZAKSi9COMV/8NdAYgJJx3SbWanZNiDiR 4EocgXfgo7zv2AQ/UaWdwg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBZ6v-0002Kk-6J; Tue, 20 Jun 2023 07:01:25 -0400 Date: Tue, 20 Jun 2023 14:01:26 +0300 Message-Id: <83fs6m75yx.fsf@gnu.org> From: Eli Zaretskii To: Filipp Gunbin In-Reply-To: (message from Filipp Gunbin on Mon, 19 Jun 2023 22:27:01 +0300) Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> <83mt0xpcns.fsf@gnu.org> <83r0q774b9.fsf@gnu.org> <83ilbj6zhs.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64089 Cc: jschmidt4gnu@vodafonemail.de, 64089@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Filipp Gunbin > Cc: 64089@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de, > monnier@iro.umontreal.ca > Date: Mon, 19 Jun 2023 22:27:01 +0300 > > >> The above formats are what ldap-search returns when given withdn=t. > >> > >> Emacs codebase doesn't use withdn=t at all, but ldap-search is a "public" > >> API function, and we're not supposed to change its return format? > > > > Where is its return format documented for the withdn=t case? > > The docstring only says "If WITHDN is non-nil, each entry in the result > will be prepended with its distinguished name WITHDN.", so nowhere, > which looks like an omission. Then please document that as part of fixing the issue on master, so that it will be documented from now on. Given all the downsides, I'm okay with reverting the fix on emacs-29. Please in the future make it clear when you object to a patch, and describe its aspects to which you object. Presenting an alternative one is not enough to convey that. If I realized at the time that you are against it, especially if you'd explain why, I would have avoided wasting my time on installing it, and that would have saved us some time discussing the issue later -- a net win for everyone. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 20 10:23:49 2023 Received: (at 64089) by debbugs.gnu.org; 20 Jun 2023 14:23:49 +0000 Received: from localhost ([127.0.0.1]:59532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBcGr-0001dl-1K for submit@debbugs.gnu.org; Tue, 20 Jun 2023 10:23:49 -0400 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:51211) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBcGp-0001dU-7C for 64089@debbugs.gnu.org; Tue, 20 Jun 2023 10:23:47 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 760913200A38; Tue, 20 Jun 2023 10:23:41 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 20 Jun 2023 10:23:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1687271021; x=1687357421; bh=1o x+vkqfQdoWt6C9goCFWrCmHhJ1o4KTpWVKfAkBUDk=; b=tCY9NLQPNxhwQW6enl PLnA3vEzYFuLno1SbSFO5WYJi3MgL8IwX2/RYEjCim4ZDECTUqTk08manfdaJv9M +1gtdlUoSf7DH+9ypzNqAA2KhF+C8vOxywqqczLQp6mVjEELfItOQC6WYofyjA5i FfEvjkVJPv93PKmdf0yC3g7QS0aoDqw0AvV3a0lhLP6DClTSm2sDnPf2B4c0tQnY SdS6yIljRlMyTdT5EKeQ6qH5WRGRVcLR1ti1+o+5FPmQ1Wp+R223IdJi4p9j7t6/ LgMCXAU4NmHUkL63u/O3ZbfcNe9PP9O0zrEoa8g5wlHeo+W93hu3KF8ScBa5Q/rR /d7Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1687271021; x=1687357421; bh=1ox+vkqfQdoWt 6C9goCFWrCmHhJ1o4KTpWVKfAkBUDk=; b=T/SmtqG0RepIob+rOl6FFKSTlgDlZ fuIHn2K67dJKJHlbD9rV+k5WQvJoEcFYxE0d3b3Z+kMWpKWs9C4KvHy3y24X0zbG GrYjTKfpuzu4dxZDs+DkNHxzd+6g4ahblPPyGr7ZKkrjzEVe9hf33f+X0RYZweM/ EXV1X3bZCh+Sc48nl0Zx+HTRLBbxXAncICdtz4gFr0TM5O6+mBm9wPgxVU75+SST wqP9rGngUWm+N3+p7ka5ZB1XzqSI3Ka0kufJb2T9nC6Xor5j1nLPjWXFO32cJEL4 CFR9M3dtNKj+v08qIRPEpuhPp+XNy9U9dlBRzX05sYTe9hudl2CuYt+/w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgeefhedgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefujghffgffkfggtgesthdtredttdertdenucfhrhhomhephfhilhhi phhpucfiuhhnsghinhcuoehfghhunhgsihhnsehfrghsthhmrghilhdrfhhmqeenucggtf frrghtthgvrhhnpeffhfejveeiieeiudetgfehffelieevfeeffedtkeelheeludefueeu udehveeiffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehfghhunhgsihhnsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Feedback-ID: id48c41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Jun 2023 10:23:39 -0400 (EDT) From: Filipp Gunbin To: Jens Schmidt Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t In-Reply-To: <6f9d69f6-13c1-ae74-45ff-7896c97e1fc2@vodafonemail.de> (Jens Schmidt's message of "Mon, 19 Jun 2023 23:37:23 +0200") References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> <83mt0xpcns.fsf@gnu.org> <83r0q774b9.fsf@gnu.org> <83ilbj6zhs.fsf@gnu.org> <43af5169-e9f5-e720-ffd5-e30f5c52da81@vodafonemail.de> <6f9d69f6-13c1-ae74-45ff-7896c97e1fc2@vodafonemail.de> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Tue, 20 Jun 2023 17:23:37 +0300 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 64089 Cc: Eli Zaretskii , 64089@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Jens, On 19/06/2023 23:37 +0200, Jens Schmidt wrote: > Hi Filipp, > > On 2023-06-19 22:35, Filipp Gunbin wrote: > >> I mean not the dn value (distinct for each record), but the string "dn" >> itself. > > misunderstood you here. I agree that the prefix "dn: " is not very > meaningful but somebody might have coded around that already. > Yes, they might. But at least we're not changing the structure, and not doing it on release branch. Of course we could prepend "dn: " back if needed. I'll document the structure now, as Eli suggested. >>> I don't think we should piggy-back too many problems on one report >> >> I don't understand what you mean here.. > > Just that there are lot of issues that we're discussing here, where > there was initially only one. It's not uncommon when you touch a piece of code, and the fix brings other changes. >> I'm on macOS, OpenLDAP 2.6.4_1 from macports. However, this string is >> appended by Emacs itself. > > But that sounds like a bug that should better be fixed elsewhere, I > think. Emacs shouldn't append text to process output unless > explicitly having been asked for that. This is not a bug, it's default process sentinel, see "(elisp) Sentinels". We could eliminate that output, but again, not on release branch. Filipp From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 20 13:52:47 2023 Received: (at control) by debbugs.gnu.org; 20 Jun 2023 17:52:47 +0000 Received: from localhost ([127.0.0.1]:59713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBfX5-0003sE-Av for submit@debbugs.gnu.org; Tue, 20 Jun 2023 13:52:47 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:50711) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBfX1-0003rf-Px; Tue, 20 Jun 2023 13:52:45 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 8D428320046E; Tue, 20 Jun 2023 13:52:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 20 Jun 2023 13:52:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1687283557; x=1687369957; bh=eK S8BNm++w1YiAUUSOFmAzRLnLBAColw85sG7AB6AOs=; b=eGBFrjND5faqz5xlYB JS4IijJrtAKSP1jxOwHOdDRdRmFp1ZBT7GJxfwRQOmCyqYsAaht8UfclimhS8u9O FPpmcSIQmi/jdjWgmMwhbxBxw/wKKi2UbGWPMbIsA+mpSpuQlZwQFxHjbavQPqC6 U7IXWS2gXMHRyKRzOvobwXWhPGx9sFP4kpqHTQsBBITA/xD6A3GrrF8sp9U7UBbk MjFBnVhAIIpGIXGZDGcs9cGeTFqJGBNKCPoSNrYu2BFmDUlNxylaPRVLHZ4oWSlz itHdzdNrxpegyVOIYl3nDKDMDMa7mvNJl/iZlH6bsq9rWvKVbdwVad9Lg/iw7vhu eOew== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1687283557; x=1687369957; bh=eKS8BNm++w1Yi AUUSOFmAzRLnLBAColw85sG7AB6AOs=; b=FhfKX2Gw8PhD6wo030BtT6fYqJlvX pe5QVUU+YfqvafVeL7D3VRRLDKtgz9cH6r2eceCAeJxISRS0zDDyRoP/hk5imUOX q8BYbtLemeStVtzMaASyJJI9HqHkDU4RGCB4DFCtoy4TJXbi7fyUH1r/oj/t392J VzwGu5O5tdY5mRV1CqyPW22m4bgY+7jKsGUtJGYlc/zF0NMwuiFN8OiXlOUEEB2a w+ZSuZVeXDdKi5B3GUyGezPxP2Icuo5RsJJCW++JLjUqXy/SnlN/eMg9HNY1hXIg 9oe0aAP4P2BvfKZIIdC6pqMA341ed5a/UYHxcrIP48+se6lsiL9NdNeXg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgeefhedgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffujghffgffkfggtgesthdtre dttdertdenucfhrhhomhephfhilhhiphhpucfiuhhnsghinhcuoehfghhunhgsihhnsehf rghsthhmrghilhdrfhhmqeenucggtffrrghtthgvrhhnpedvveekffdvueevhfdutdejhe ekvdeufeevtedttdevuddugfeiffeiveeivefhtdenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpehfghhunhgsihhnsehfrghsthhmrghilhdrfh hm X-ME-Proxy: Feedback-ID: id48c41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Jun 2023 13:52:36 -0400 (EDT) From: Filipp Gunbin To: 64089-done@debbugs.gnu.org Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t In-Reply-To: <83fs6m75yx.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 20 Jun 2023 14:01:26 +0300") References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> <83mt0xpcns.fsf@gnu.org> <83r0q774b9.fsf@gnu.org> <83ilbj6zhs.fsf@gnu.org> <83fs6m75yx.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Tue, 20 Jun 2023 20:52:32 +0300 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) close 64089 30.0.50 quit On 20/06/2023 14:01 +0300, Eli Zaretskii wrote: [...] >> The docstring only says "If WITHDN is non-nil, each entry in the result >> will be prepended with its distinguished name WITHDN.", so nowhere, >> which looks like an omission. > > Then please document that as part of fixing the issue on master, so > that it will be documented from now on. Done and pushed in master, closing this bug. > Given all the downsides, I'm okay with reverting the fix on emacs-29. Reverted on emacs-29. > Please in the future make it clear when you object to a patch, and > describe its aspects to which you object. Presenting an alternative > one is not enough to convey that. If I realized at the time that you > are against it, especially if you'd explain why, I would have avoided > wasting my time on installing it, and that would have saved us some > time discussing the issue later -- a net win for everyone. Sorry, will try to be more clear in future. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 20 16:42:33 2023 Received: (at 64089) by debbugs.gnu.org; 20 Jun 2023 20:42:33 +0000 Received: from localhost ([127.0.0.1]:59844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBiBN-0006a5-2X for submit@debbugs.gnu.org; Tue, 20 Jun 2023 16:42:33 -0400 Received: from mr6.vodafonemail.de ([145.253.228.166]:52150) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBiBJ-0006Zm-MC for 64089@debbugs.gnu.org; Tue, 20 Jun 2023 16:42:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1687293743; bh=CEhOyDMywQGyHssoHoWwxLb3qgXdZ7vmfCMCD1HlaQE=; h=Message-ID:Date:User-Agent:Subject:Content-Language:To:References: From:In-Reply-To:Content-Type:From; b=DVpCnrXdusmGtshaqYPEzJmWedmgCEU69xG8+USYOmq1fket8ccydVAlTsqhrlMk6 3Itj7MAkMEYwr0/VeYNf53dtyBlFmfXXuazaAjKw2Dd2kdll7Kvz94HMTuFeZK7e3b ePAZYTeTIyGldQKk5ed5S96rParhbiG/dO773pj0= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr6.vodafonemail.de (Postfix) with ESMTPS id 4Qlz8b27HJz1yG9; Tue, 20 Jun 2023 20:42:23 +0000 (UTC) Received: from [192.168.178.41] (port-92-194-230-86.dynamic.as20676.net [92.194.230.86]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4Qlz8R6BCFz9s27; Tue, 20 Jun 2023 20:42:12 +0000 (UTC) Message-ID: <73dc3428-393b-95ad-8219-9019293b3286@vodafonemail.de> Date: Tue, 20 Jun 2023 22:42:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t Content-Language: de-DE-frami, en-US To: Filipp Gunbin References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> <83mt0xpcns.fsf@gnu.org> <83r0q774b9.fsf@gnu.org> <83ilbj6zhs.fsf@gnu.org> <43af5169-e9f5-e720-ffd5-e30f5c52da81@vodafonemail.de> <6f9d69f6-13c1-ae74-45ff-7896c97e1fc2@vodafonemail.de> From: Jens Schmidt In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-purgate-type: clean X-purgate: clean X-purgate-size: 283 X-purgate-ID: 155817::1687293739-B27FCC59-0B154ADC/0/0 X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 64089 Cc: 64089@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) Hi Filipp On 2023-06-20 16:23, Filipp Gunbin wrote: > This is not a bug [...]. It is: The sentinel is not properly set up for calling ldapsearch. And I understood that you wanted to work around that in the parsing loop instead, which I would consider bad practice. From unknown Fri Aug 15 04:05:27 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 19 Jul 2023 11:24:15 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator