From patchwork Wed Oct 22 09:40:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Hu X-Patchwork-Id: 401984 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 416D514003E; Wed, 22 Oct 2014 20:42:10 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1XgsQj-0008MJ-4n; Wed, 22 Oct 2014 09:42:09 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1XgsQL-0008L6-TL for fwts-devel@lists.ubuntu.com; Wed, 22 Oct 2014 09:41:45 +0000 Received: from [175.41.48.77] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1XgsQL-0004wy-Ai; Wed, 22 Oct 2014 09:41:45 +0000 From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH 15/15] uefirtauthvar: cleanup environment for another authenticated variable Date: Wed, 22 Oct 2014 17:40:40 +0800 Message-Id: <1413970840-27212-8-git-send-email-ivan.hu@canonical.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1413970840-27212-1-git-send-email-ivan.hu@canonical.com> References: <1413970840-27212-1-git-send-email-ivan.hu@canonical.com> X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: fwts-devel-bounces@lists.ubuntu.com Delete the test authenticated variable created by another key before starting the tests. Signed-off-by: Ivan Hu Acked-by: Colin Ian King Acked-by: Alex Hung --- src/uefi/uefirtauthvar/uefirtauthvar.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/uefi/uefirtauthvar/uefirtauthvar.c b/src/uefi/uefirtauthvar/uefirtauthvar.c index 1afa1de..7d2fa05 100644 --- a/src/uefi/uefirtauthvar/uefirtauthvar.c +++ b/src/uefi/uefirtauthvar/uefirtauthvar.c @@ -96,9 +96,10 @@ static void uefirtvariable_env_cleanup(void) uint32_t attributestest; getvar(>estguid, &attributestest, &getdatasize, data, &status); - if (status == EFI_SUCCESS) + if (status == EFI_SUCCESS) { setvar(>estguid, attributes, sizeof(AuthVarDel), AuthVarDel, &status); - + setvar(>estguid, attributes, sizeof(AuthVarDelDiff), AuthVarDelDiff, &status); + } } static int uefirtauthvar_init(fwts_framework *fw)