From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t Date: Sat, 17 Jun 2023 09:03:25 +0300 Message-ID: <83cz1usk0i.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31606"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64089@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de, monnier@iro.umontreal.ca To: Filipp Gunbin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 17 08:04:18 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 1qAP2n-00083n-PR for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Jun 2023 08:04:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAP2c-0004UY-0f; Sat, 17 Jun 2023 02:04:06 -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 1qAP2Y-0004U0-Oj for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2023 02:04:04 -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 1qAP2Y-0002ZM-Fi for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2023 02:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qAP2X-0005CD-WE for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2023 02:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Jun 2023 06:04: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.168698181719938 (code B ref 64089); Sat, 17 Jun 2023 06:04:01 +0000 Original-Received: (at 64089) by debbugs.gnu.org; 17 Jun 2023 06:03:37 +0000 Original-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 Original-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 Original-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==; Original-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 In-Reply-To: (message from Filipp Gunbin on Sat, 17 Jun 2023 01:13:33 +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:263502 Archived-At: > 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.