From nobody Sun Feb 8 17:22:19 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=1561038678; cv=none; d=zoho.com; s=zohoarc; b=KpbZ5a3t6n40yGVWLFrUtRNmYQHnLgBlv2INNGE3ZjtgVUl6obaiEp2lDSW4HQ0UBw/bhAoyGPj17QGOc9NwD6M6epJPm6iVN4c7avqIZaaijShRzArCGaGkZrKHPPolNcABF1ofdV/jFWOejD2+uxpU3usxvW9VTMjmgvMPA8g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561038678; 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=yEVkWD1i/Vnk6L34NpTvNRRxRimOs6Vwz1uqs9OeaDk=; b=YI5vAYT3b/GzfLiGqdyCsTyY/QfloBax7ZN+I+CWxsRcV8xwiVGYcJxlUlSt2gqB/hRt1VfTJNAhMQtB4L8Bvr+gSs8Hv0gfi14gz8S5ww3yMf2Q1UBtvzlg9hPOhE3a2+PFghDRM5kqzbdDaO+SUcjFkPmwm+smp7FjGbCgfIs= 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 1561038678642959.0686722424985; Thu, 20 Jun 2019 06:51:18 -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 9C0B530C0DEA; Thu, 20 Jun 2019 13:51:16 +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 73F0C5D71C; Thu, 20 Jun 2019 13:51:16 +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 3701C1806B12; Thu, 20 Jun 2019 13:51:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5KDpCEk001006 for ; Thu, 20 Jun 2019 09:51:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8E7ED5C221; Thu, 20 Jun 2019 13:51:12 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id E8BA55C1A1; Thu, 20 Jun 2019 13:51:11 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 20 Jun 2019 15:51:04 +0200 Message-Id: <2dd3c868a6af335cd1b3a75de2e3efaba4616527.1561038533.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/3] docs: schemas: Add 'seclabel' for external disk snapshot 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.45]); Thu, 20 Jun 2019 13:51:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Allow using seclabels the same way as disk images allow it. Currently the snapshot code copies the seclabels from the original image if no seclabel is provided. Also there's no code change required as the snapshot XML parser actually uses parts of the disk parser thus seclabels are already parsed and formatted and even applied thus this is just a formalization of our support for this. Signed-off-by: Peter Krempa --- docs/formatsnapshot.html.in | 12 ++++++++++++ docs/schemas/domainsnapshot.rng | 6 ++++++ .../{disk-seclabel-invalid.xml =3D> disk-seclabel.xml} | 0 3 files changed, 18 insertions(+) rename tests/domainsnapshotxml2xmlin/{disk-seclabel-invalid.xml =3D> disk-= seclabel.xml} (100%) diff --git a/docs/formatsnapshot.html.in b/docs/formatsnapshot.html.in index a19e91b4d5..92cc566467 100644 --- a/docs/formatsnapshot.html.in +++ b/docs/formatsnapshot.html.in @@ -170,6 +170,12 @@ snapshots, the original file name becomes the read-only snapshot, and the new file name contains the read-write delta of all disk changes since the snapshot. +

+ The source element also may contain the + seclabel element (described in the + domain XML documentat= ion) + which can be used to override the domain security labeling p= olicy + for source.

driver
An optional sub-element driver, @@ -177,6 +183,7 @@ as qcow2), of the new file created by the external snapshot of the new file.
+
seclabel
Since 1.2.2 the disk= element @@ -259,6 +266,11 @@ <source file=3D'/path/to/new'/> </disk> <disk name=3D'vdb' snapshot=3D'no'/> + <disk name=3D'vdc'> + <source file=3D'/path/to/newc'> + <seclabel model=3D'dac' relabel=3D'no'/> + </source> + </disk> </disks> </domainsnapshot> diff --git a/docs/schemas/domainsnapshot.rng b/docs/schemas/domainsnapshot.= rng index 8863d99578..8e39feb229 100644 --- a/docs/schemas/domainsnapshot.rng +++ b/docs/schemas/domainsnapshot.rng @@ -157,6 +157,9 @@ + + + @@ -173,6 +176,9 @@ + + + diff --git a/tests/domainsnapshotxml2xmlin/disk-seclabel-invalid.xml b/test= s/domainsnapshotxml2xmlin/disk-seclabel.xml similarity index 100% rename from tests/domainsnapshotxml2xmlin/disk-seclabel-invalid.xml rename to tests/domainsnapshotxml2xmlin/disk-seclabel.xml --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list