From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 171B21FF16B for ; Thu, 17 Apr 2025 08:29:43 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id CC42AC292; Thu, 17 Apr 2025 08:29:31 +0200 (CEST) To: pve-devel@lists.proxmox.com Date: Wed, 16 Apr 2025 22:55:32 +0200 In-Reply-To: <20250416205656.153451-1-riedel@teco.edu> References: <20250416205656.153451-1-riedel@teco.edu> X-Mailman-Approved-At: Thu, 17 Apr 2025 08:29:30 +0200 MIME-Version: 1.0 Message-ID: List-Id: Proxmox VE development discussion List-Post: From: Till Riedel via pve-devel Precedence: list Cc: Till Riedel X-Mailman-Version: 2.1.29 X-BeenThere: pve-devel@lists.proxmox.com List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Proxmox VE development discussion List-Help: Subject: [pve-devel] [PATCH 1/2] Suppport for LDAP PosixGroups->memberUid Content-Type: multipart/mixed; boundary="===============1777892940069878840==" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" --===============1777892940069878840== Content-Type: message/rfc822 Content-Disposition: inline Return-Path: X-Original-To: pve-devel@lists.proxmox.com Delivered-To: pve-devel@lists.proxmox.com Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (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 lists.proxmox.com (Postfix) with ESMTPS id BDA0DD5F60 for ; Wed, 16 Apr 2025 22:57:13 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A832764BD for ; Wed, 16 Apr 2025 22:57:13 +0200 (CEST) Received: from scc-mailout-kit-02.scc.kit.edu (scc-mailout-kit-02.scc.kit.edu [IPv6:2a00:1398:9:f712::810d:e752]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Wed, 16 Apr 2025 22:57:09 +0200 (CEST) Received: by scc-mailout-kit-02.scc.kit.edu with esmtps (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (envelope-from ) id 1u59oc-00A80a-0u for pve-devel@lists.proxmox.com; Wed, 16 Apr 2025 22:57:03 +0200 Received: from [129.13.170.146] (helo=teco.edu) by mailhost.teco.edu with smtp (Exim 4.96) (envelope-from ) id 1u59ob-005i0h-1O; Wed, 16 Apr 2025 20:57:02 +0000 Received: (nullmailer pid 153490 invoked by uid 7534); Wed, 16 Apr 2025 20:57:02 -0000 From: Till Riedel To: pve-devel@lists.proxmox.com Cc: Till Riedel Subject: [PATCH 1/2] Suppport for LDAP PosixGroups->memberUid Date: Wed, 16 Apr 2025 22:55:32 +0200 Message-ID: <20250416205656.153451-3-riedel@teco.edu> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250416205656.153451-1-riedel@teco.edu> References: <20250416205656.153451-1-riedel@teco.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.383 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_PASS -0.1 DMARC pass policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [ldap.pm] X-Mailman-Approved-At: Thu, 17 Apr 2025 08:29:30 +0200 Signed-off-by: Till Riedel --- src/PVE/LDAP.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PVE/LDAP.pm b/src/PVE/LDAP.pm index 16a0a8e..ab7df3e 100644 --- a/src/PVE/LDAP.pm +++ b/src/PVE/LDAP.pm @@ -208,7 +208,7 @@ sub query_groups { my $page = Net::LDAP::Control::Paged->new(size => 100); - my $attrs = [ 'member', 'uniqueMember' ]; + my $attrs = [ '*' ]; push @$attrs, $group_name_attr if $group_name_attr; my @args = ( base => $base_dn, @@ -241,6 +241,10 @@ sub query_groups { if (!scalar(@$members)) { $members = [$entry->get_value('uniqueMember')]; } + if (!scalar(@$members)) { + $members = [$entry->get_value('memberUid')]; + } + $group->{members} = $members; if ($group_name_attr && (my $name = $entry->get_value($group_name_attr))) { $group->{name} = $name; -- 2.45.1 --===============1777892940069878840== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel --===============1777892940069878840==--