From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Filipp Gunbin Newsgroups: gmane.emacs.bugs Subject: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t Date: Mon, 19 Jun 2023 22:27:01 +0300 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13414"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: jschmidt4gnu@vodafonemail.de, 64089@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 19 21:28:17 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qBKXu-0003An-VD for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Jun 2023 21:28:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBKXj-00019n-ES; Mon, 19 Jun 2023 15:28:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBKXi-00019d-9K for bug-gnu-emacs@gnu.org; Mon, 19 Jun 2023 15:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBKXi-0002Nd-0B for bug-gnu-emacs@gnu.org; Mon, 19 Jun 2023 15:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qBKXh-00019S-Ru for bug-gnu-emacs@gnu.org; Mon, 19 Jun 2023 15:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Filipp Gunbin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Jun 2023 19:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64089 X-GNU-PR-Package: emacs Original-Received: via spool by 64089-submit@debbugs.gnu.org id=B64089.16872028324356 (code B ref 64089); Mon, 19 Jun 2023 19:28:01 +0000 Original-Received: (at 64089) by debbugs.gnu.org; 19 Jun 2023 19:27:12 +0000 Original-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 Original-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 Original-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) Original-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 Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 19 Jun 2023 15:27:03 -0400 (EDT) In-Reply-To: <83ilbj6zhs.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 19 Jun 2023 22:09:03 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263713 Archived-At: 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