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#58605: 29.0.50; Commit 2a2f5530fa2 breaks ldap-search-internal Date: Mon, 24 Oct 2022 19:06:37 +0300 Message-ID: References: <87wn8xr7i6.fsf@wi.uni-muenster.de> <86fsfidgyr.fsf@mail.linkov.net> <87ilkd7kww.fsf@wi.uni-muenster.de> <874jvwp51w.fsf@wi.uni-muenster.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32435"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 58605@debbugs.gnu.org, Juri Linkov To: Jens Lechtenboerger Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 24 19:37:58 2022 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 1on1Of-0008CX-FF for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 Oct 2022 19:37:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omzyq-0003zH-PE; Mon, 24 Oct 2022 12:07:12 -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 1omzyk-0003z6-Ar for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2022 12:07:06 -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 1omzyg-0007NY-T5 for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2022 12:07:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omzyg-0002ZN-Fn for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2022 12:07:02 -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, 24 Oct 2022 16:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58605 X-GNU-PR-Package: emacs Original-Received: via spool by 58605-submit@debbugs.gnu.org id=B58605.16666276119853 (code B ref 58605); Mon, 24 Oct 2022 16:07:02 +0000 Original-Received: (at 58605) by debbugs.gnu.org; 24 Oct 2022 16:06:51 +0000 Original-Received: from localhost ([127.0.0.1]:49320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omzyV-0002Yr-9l for submit@debbugs.gnu.org; Mon, 24 Oct 2022 12:06:51 -0400 Original-Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:48803) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omzyT-0002YY-DZ for 58605@debbugs.gnu.org; Mon, 24 Oct 2022 12:06:50 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 8F5AF3200312; Mon, 24 Oct 2022 12:06:42 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 24 Oct 2022 12:06:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc: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=fm3; t=1666627602; x=1666714002; bh=HsmVPqY6Jl VnTYSuGRDp4ccqX1Brvh2mU60NyN4VJTE=; b=ZVnqsezM7RVRp1hMfx+pNNrbt3 h4Xx9wFtTw4NxEdRYDkjHOmQxckC+7jHSSwFqLK0rM8A+6ElymcUpENxhhZiWy+l UH7eGG0rK/xUakB6lUOrfmSnQSMU85TOx33WO04Wcb7lcpVKXdulYwIVQWlwHQ+V afSv7A1qVwJ9N/UYGdPO3R2HnACiAeor1FdCmVvo6oeBf+lcGdIotwM9Ei6nsAlJ 1+GCq6yhBmBdCVsqZHFtuepCDJfhg1Z3Nsh5oV6V6HV7bUMV03q0CYnenPOL/Imm SzOBFiVgThIlJJLKU8C0fPGXPiH3+vr3xCKDjR8LfdasPqR9lENWGSqSa96Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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= fm3; t=1666627602; x=1666714002; bh=HsmVPqY6JlVnTYSuGRDp4ccqX1Br vh2mU60NyN4VJTE=; b=jEWcEbZh6VEeyDQT6+EQYLwR/kaog8oDyXVpaMccKOFz mAlxyaNIGQHy+k1lJhVYkzvhHknbwt1g7ckXIrNZBCuYl15Os4WZ1mplvz5rleO1 4DfC19wQXM2YdLtjF0epQDUK2ysx8Mq8GMfqctQnGSX/8pNJlzEHJPWpPAD/aKkU cN8Q1dSGuCFDjYaMI4YVHEOtcisI88VswIhk8+0pzeN1Nr9pnGliYuuHCsk679dW jhOHwIDnZ8eKd485fkXA6+cgJDBvmlRUXKvCiZ65c6WaOmColFD2VrBqy/Sv5eKl QO3w50WdgqIbvr9+mwTsGm5cXbY1dT/Dt0GKgsI0UA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrgedtgedgleduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefujghffgffkfggtgesthdtredttdertdenucfhrhhomhephfhilhhi phhpucfiuhhnsghinhcuoehfghhunhgsihhnsehfrghsthhmrghilhdrfhhmqeenucggtf frrghtthgvrhhnpeeuueffhfevheefhefgheelvdeuhfehheekfeefieelueffkeekueej vdfggeefkeenucffohhmrghinhepughfnhdruggvpdgvgigrmhhplhgvrdhorhhgnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepfhhguhhnsghi nhesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: id48c41f1:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Oct 2022 12:06:40 -0400 (EDT) In-Reply-To: <874jvwp51w.fsf@wi.uni-muenster.de> (Jens Lechtenboerger's message of "Sat, 22 Oct 2022 11:43:07 +0200") 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: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246115 Archived-At: Hi Jens, On 22/10/2022 11:43 +0200, Jens Lechtenboerger wrote: > Hi there! > > On 2022-10-21, Filipp Gunbin wrote: > >> Oh, so this is not just a test case, but the code you actually use. Add >> "-LLL" to ldap-ldapsearch-args? > > This was a test case. In my code [1], I use ldap-search, not the > internal function. Essentially, like this: > > (let ((ldap-default-base "O=DFN-Verein,C=DE") > (ldap-ldapsearch-args '("-x" "-tt" "-H ldaps://ldap.pca.dfn.de")) > (mail "nix@example.org") > (host "")) > (ldap-search (concat "mail=" mail) host '("userCertificate") nil)) > > Previously, this just returned the userCertificate, with and without > -LLL. If no certificate existed, it returned nil. > > Now, -LLL seems to be required, which I perceive to be a breaking > change. Can this be avoided? Alternatively, document it? > > I confirm that with -LLL, my code works. > > Without it, I get ((("search" " ") ("result" " "))) instead of nil. But ldap-search expects ldap-ldapsearch-args to be at least what default value is, to be able to parse the output (btw, "-LL" was there since "forever", which is 20 years in this case; it's just the third L which was added recently, to exclude ldif version from the output). Also, default value can change along with ldap-search internal changes. So if you want to let-bind it, you should merge in your additional args, not replace them. However, I don't see why you would want to let-bind it: - -H: Why don't you use host parameter? - -x: just pass 'auth = simple - -tt: already in ldap-ldapsearch-args Even more, I'd say that the user should set ldap-host-parameters-alist according to his/her setup, and you should not mess with ldapsearch arguments at all. Like: (setq ldap-host-parameters-alist '(("ldap://example.org" auth simple auth-source t))) Then just invoke: (ldap-search "mail=.." "ldap://example.org" '("userCertificate")) > Also, without -LLL and with an existing certificate, ("dn" " ") and > (("search" " ") ("result" " ")) are included in the result. Note > that I find ("dn" " ") misleading, as ldapsearch really does return > a dn value... Without -LL(L), the parsing code works incorrectly, and this case "worked" before only by coincidence. HTH, Filipp