From patchwork Mon Oct 7 21:49:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 175430 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp4848665ill; Mon, 7 Oct 2019 14:53:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKMPvlxUZG21FIswPYCoUXpvmipzOp4rv7dmFfzZTi6CZYs1Zy469st2KordKwC3x0u0Mu X-Received: by 2002:a05:6e02:c27:: with SMTP id q7mr31385980ilg.148.1570485184114; Mon, 07 Oct 2019 14:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570485184; cv=none; d=google.com; s=arc-20160816; b=wNgzpase1vihXOElu2DGL/KvPergka2Dk6cLsWWQSUzNntH4HFTeQFFzCzXBngFxQB p+OWAlP1Jzh8z2Jyqv7uZSbnzUw3iNyrp+/GWbbVsAEQ8CeP1i+9FP4SBj22M2quWop6 VBAguJ66R1aOkTOzWqhbUEgs7FHqdtSaPVeudAoAOgYxXiTzWC7rK1XsouqtbKtZkgJ5 lf9M6I/48f8kwjDPkgdb7XV3Ksux8mA2VKY52IddPKmdEDyyO+vzzT/6hxMkTwlbVT+T evSSJwbw2OLtYzOGTMOAFZmuHVaB4Ib1Xt4ETV9GF0eQp3Kzm0p8N8oPl4D1m33YLX18 Mxsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=2gXxKKhlWmJ43MeDExTA1chlDm6hIrwWOeG+FMZHA5o=; b=ww+b3BxdGgQCSlzq3Wm09WJ+u2egTxtBqcQh27WCMFhjzO2N5rqrJEmdKWaXnEt4F2 VlGB24lINaTX1cHQqrSx6HjS30CLiW/Um6Bp4sv2uAgX8Oe0HI+4+C02fwpw/PTuZnkB FK43PmKvBXzzcM24DhfHI7JSbflfs0wNPhhDRq6TVW7vPcwbxO5K6GCvbni85mqqAyn0 A32HPFbaLwXXWRa4zXPg5ljtiHddrLYztix9sVLiclIPbbGM7wfsEBWlvOugTVOkOvyt 7GqPEIcjOsxWwng4uTLIqQdy5QikriOa5zHYmwShUerD3YzjaZjLoZzjOrX1S01ww+fc Z/Qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id l7si18022409ilg.18.2019.10.07.14.53.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Oct 2019 14:53:04 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E194B308402D; Mon, 7 Oct 2019 21:53:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BA5625DA8C; Mon, 7 Oct 2019 21:53:02 +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 7F28C4EEB8; Mon, 7 Oct 2019 21:53:02 +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 x97LocIY015094 for ; Mon, 7 Oct 2019 17:50:38 -0400 Received: by smtp.corp.redhat.com (Postfix) id 44B885C231; Mon, 7 Oct 2019 21:50:38 +0000 (UTC) Delivered-To: libvir-list@redhat.com Received: from worklaptop.redhat.com (ovpn-123-156.rdu2.redhat.com [10.10.123.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4451C5C224; Mon, 7 Oct 2019 21:50:33 +0000 (UTC) From: Cole Robinson To: libvir-list@redhat.com Date: Mon, 7 Oct 2019 17:49:34 -0400 Message-Id: <54d9c4ea4531ec10f219e92b6de133a496d24f1f.1570482718.git.crobinso@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 20/30] security: dac: Drop !parent handling in SetImageLabelInternal 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 07 Oct 2019 21:53:03 +0000 (UTC) The only caller always passes in a non-null parent Signed-off-by: Cole Robinson --- src/security/security_dac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Reviewed-by: Daniel Henrique Barboza diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 4b4afef18a..bcc781213e 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -893,9 +893,8 @@ virSecurityDACSetImageLabelInternal(virSecurityManagerPtr mgr, return 0; disk_seclabel = virStorageSourceGetSecurityLabelDef(src, SECURITY_DAC_NAME); - if (parent) - parent_seclabel = virStorageSourceGetSecurityLabelDef(parent, - SECURITY_DAC_NAME); + parent_seclabel = virStorageSourceGetSecurityLabelDef(parent, + SECURITY_DAC_NAME); if (disk_seclabel && (!disk_seclabel->relabel || disk_seclabel->label)) { if (!disk_seclabel->relabel)