From nobody Sun Feb 8 22:57:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1568625149; cv=none; d=zoho.com; s=zohoarc; b=YOj5/9Y8O0kA8+BYudKJkaITKq8gZH0pEdR7yTqD97YnHgejzC4FX5A6FKgpRhBdB2k41UBPCm9etMUGFIaVRMEPX2XJ5u4u1OXzwMWOb5dEQbsQi2++wa56/pvLTM1xsW2DPF2kfdn4TvtClDAH7zcszov8yO7+AFmpsV/yPR4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568625149; 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:ARC-Authentication-Results; bh=IqWJ0a512i5lga2ZUIQlTzs3ocaAD87DmB3RDoNljKw=; b=gvg8lRVqiBdLMuK/2YuWm723AQbA7eAD+qvVUBS2B9rFJTPUZDcAyVu6iV+U0zPyTq7cOmRxv/QeLpFTtnNUyM8g7xsuxmIOLzRwCRo9EJoV92OFaV1lDPK8SUYDeHl+kxm4sH4w8dKnb0jSytNWMywFuCo2LUT1Pb/b31aYNJE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1568625149581476.52893119224893; Mon, 16 Sep 2019 02:12:29 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B19473084037; Mon, 16 Sep 2019 09:12:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8D55A61F22; Mon, 16 Sep 2019 09:12:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 53887180B536; Mon, 16 Sep 2019 09:12:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x8G9CFxa015505 for ; Mon, 16 Sep 2019 05:12:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id 320AA5B69A; Mon, 16 Sep 2019 09:12:15 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id AEAE061559 for ; Mon, 16 Sep 2019 09:12:14 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Mon, 16 Sep 2019 11:12:06 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/5] security: Introduce virSecurityManagerGetDriver() X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 16 Sep 2019 09:12:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" This function returns the name of the secdriver. Since the name is invariant we don't really need to lock the manager - it won't change. Signed-off-by: Michal Privoznik --- src/security/security_manager.c | 7 +++++++ src/security/security_manager.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/security/security_manager.c b/src/security/security_manage= r.c index c513740a13..99281821d9 100644 --- a/src/security/security_manager.c +++ b/src/security/security_manager.c @@ -332,6 +332,13 @@ virSecurityManagerGetVirtDriver(virSecurityManagerPtr = mgr) } =20 =20 +const char * +virSecurityManagerGetDriver(virSecurityManagerPtr mgr) +{ + return mgr->drv->name; +} + + const char * virSecurityManagerGetDOI(virSecurityManagerPtr mgr) { diff --git a/src/security/security_manager.h b/src/security/security_manage= r.h index 306de92978..f835356b7e 100644 --- a/src/security/security_manager.h +++ b/src/security/security_manager.h @@ -80,6 +80,7 @@ void virSecurityManagerTransactionAbort(virSecurityManage= rPtr mgr); =20 void *virSecurityManagerGetPrivateData(virSecurityManagerPtr mgr); =20 +const char *virSecurityManagerGetDriver(virSecurityManagerPtr mgr); const char *virSecurityManagerGetVirtDriver(virSecurityManagerPtr mgr); const char *virSecurityManagerGetDOI(virSecurityManagerPtr mgr); const char *virSecurityManagerGetModel(virSecurityManagerPtr mgr); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list