From nobody Mon Feb 9 00:56:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1676890038; cv=none; d=zohomail.com; s=zohoarc; b=cZauie3h91GmSyR9fS9wT1wOGIihchVqPBxDWtzHM4oUBHBU5xTRrc56RB8MmHCS5KnSSaVD/dQj2psh93KG1Og2scRjVKQ48+AB/XPXJL/KFzZAnwuCehmuWlTQQXwj9r5RS+ItyB1jdxPbxh5ybUH72sWPvGp8AMfqp3VDK78= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676890038; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lMXMJYuNC/QXRT0tYaAzBD24MkMWLYNC1dqgDlh7Mh4=; b=TrYXHlr1/RJ+cPOdmUfABzwWIYmT04IAfRUaZU8j18s9k8s+0J9bqtVQQlqURIq8hRW60r3YP87X04WbJXaybrh2RfWIoPcaUTh540aoOoIjszSmGWwbtGEENzeUWJtU9eN30Nr8Usrg5ETCX/2XQCe2MleTsZqe8Ebus9uDH7o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1676890038308378.5043694668649; Mon, 20 Feb 2023 02:47:18 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-341-XRzofVPFPna1-ZrvdSoB9g-1; Mon, 20 Feb 2023 05:47:15 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 835DF3C02B6A; Mon, 20 Feb 2023 10:47:13 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 711292166B29; Mon, 20 Feb 2023 10:47:13 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 56EA61946588; Mon, 20 Feb 2023 10:47:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9971D1946587 for ; Mon, 20 Feb 2023 10:47:12 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8B9D4492B06; Mon, 20 Feb 2023 10:47:12 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 10589492B05 for ; Mon, 20 Feb 2023 10:47:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676890037; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=lMXMJYuNC/QXRT0tYaAzBD24MkMWLYNC1dqgDlh7Mh4=; b=AV9lb7UZiIu2sTvqwksyr9k5SCoDj+5qfZlW7ovM1NaQB1umps5rLIJHU3t1F41asP1lQ3 kJvTK3isIm9hcx6EXTMmIrm/SD4MWrKk4UiTRgy+RI+pFk3GDfUozkqWm+VWsDcPWnLoc5 XpXDp7kGKQGH6n4OBUDaFBdXHCz0Bcc= X-MC-Unique: XRzofVPFPna1-ZrvdSoB9g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/6] docs: Fix generated names for ACL objects Date: Mon, 20 Feb 2023 11:47:04 +0100 Message-Id: <3c08cf39f7a3181d11195340a65e5ff0da7d6803.1676889902.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1676890039534100002 Content-Type: text/plain; charset="utf-8" Both the object name and permission name in ACL use '-' instead of '_' separator when refering to them in the docs or even when used inside of polkig. Unfortunately the generators used for generating our docs don't honour this in certain cases which would result in broken names in the API docs (once they will be generated). Rename both object and permission name to use dash and reflect that in the anchor names in the documentation. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- scripts/genaclperms.py | 6 +++--- src/rpc/gendispatch.pl | 13 +++++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/scripts/genaclperms.py b/scripts/genaclperms.py index 43616dad04..eaf4a3d17d 100755 --- a/scripts/genaclperms.py +++ b/scripts/genaclperms.py @@ -88,7 +88,8 @@ print(' ') for obj in sorted(perms.keys()): klass =3D classes[obj] - olink =3D "object_" + obj.lower() + objname =3D obj.lower().replace("_", "-") + olink =3D "object_" + objname print('

%s

' % (olink, klass)) print(' ') @@ -112,8 +113,7 @@ for obj in sorted(perms.keys()): if description is None: raise Exception("missing description for %s.%s" % (obj, perm)) - plink =3D "perm_" + obj.lower() + "_" + perm.lower() - plink =3D plink.replace("-", "_") + plink =3D "perm_" + objname + "_" + perm.lower() print(' ') print(' ' % (plink, perm)) diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl index 085e2a29d8..c5f5c85811 100755 --- a/src/rpc/gendispatch.pl +++ b/src/rpc/gendispatch.pl @@ -2262,7 +2262,11 @@ elsif ($mode eq "client") { my $acl =3D $call->{acl}; foreach (@{$acl}) { my @bits =3D split /:/; - print " {aclfilter}; foreach (@{$aclfilter}) { my @bits =3D split /:/; - print " = \n"; + my $objname =3D $bits[0]; + $objname =3D~ s/_/-/g; + my $perm =3D $bits[1]; + $perm =3D~ s/_/-/g; + + print " \n"; } print " \n"; --=20 2.39.2
%s