From owner-svn-ports-head@freebsd.org Tue Jun 25 13:32:35 2019 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 797B515CCED1; Tue, 25 Jun 2019 13:32:35 +0000 (UTC) (envelope-from egypcio@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E3968BA17; Tue, 25 Jun 2019 13:32:35 +0000 (UTC) (envelope-from egypcio@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E3976190B0; Tue, 25 Jun 2019 13:32:34 +0000 (UTC) (envelope-from egypcio@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5PDWYBR093202; Tue, 25 Jun 2019 13:32:34 GMT (envelope-from egypcio@FreeBSD.org) Received: (from egypcio@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5PDWYTG093200; Tue, 25 Jun 2019 13:32:34 GMT (envelope-from egypcio@FreeBSD.org) Message-Id: <201906251332.x5PDWYTG093200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: egypcio set sender to egypcio@FreeBSD.org using -f From: =?UTF-8?Q?Vin=c3=adcius_Zavam?= Date: Tue, 25 Jun 2019 13:32:34 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r505089 - in head/sysutils/shim: . files X-SVN-Group: ports-head X-SVN-Commit-Author: egypcio X-SVN-Commit-Paths: in head/sysutils/shim: . files X-SVN-Commit-Revision: 505089 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1E3968BA17 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.940,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jun 2019 13:32:35 -0000 Author: egypcio Date: Tue Jun 25 13:32:34 2019 New Revision: 505089 URL: https://svnweb.freebsd.org/changeset/ports/505089 Log: sysutils/shim: unbreak build with GCC 9 PR: 238654 Submitted by: tobik Approved by: mentors (implicit) Obtained from: https://github.com/rhboot/shim/pull/170 Modified: head/sysutils/shim/Makefile head/sysutils/shim/files/patch-MokManager.c Modified: head/sysutils/shim/Makefile ============================================================================== --- head/sysutils/shim/Makefile Tue Jun 25 13:31:52 2019 (r505088) +++ head/sysutils/shim/Makefile Tue Jun 25 13:32:34 2019 (r505089) @@ -3,7 +3,7 @@ PORTNAME= shim PORTVERSION= 0.9 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= sysutils MAINTAINER= egypcio@FreeBSD.org Modified: head/sysutils/shim/files/patch-MokManager.c ============================================================================== --- head/sysutils/shim/files/patch-MokManager.c Tue Jun 25 13:31:52 2019 (r505088) +++ head/sysutils/shim/files/patch-MokManager.c Tue Jun 25 13:32:34 2019 (r505089) @@ -1,6 +1,6 @@ --- MokManager.c.orig 2015-06-30 18:20:12 UTC +++ MokManager.c -@@ -588,11 +588,11 @@ static void show_mok_info (EFI_GUID Type +@@ -588,11 +588,11 @@ static void show_mok_info (EFI_GUID Type, void *Mok, U static EFI_STATUS list_keys (void *KeyList, UINTN KeyListSize, CHAR16 *title) { @@ -14,3 +14,52 @@ if (KeyListSize < (sizeof(EFI_SIGNATURE_LIST) + sizeof(EFI_SIGNATURE_DATA))) { +@@ -1037,7 +1037,8 @@ static EFI_STATUS write_back_mok_list (MokListNode *li + continue; + + DataSize += sizeof(EFI_SIGNATURE_LIST); +- if (CompareGuid(&(list[i].Type), &CertType) == 0) ++ if (CompareMem(&(list[i].Type), &CertType, ++ sizeof(EFI_GUID)) == 0) + DataSize += sizeof(EFI_GUID); + DataSize += list[i].MokSize; + } +@@ -1059,7 +1060,8 @@ static EFI_STATUS write_back_mok_list (MokListNode *li + CertList->SignatureType = list[i].Type; + CertList->SignatureHeaderSize = 0; + +- if (CompareGuid(&(list[i].Type), &CertType) == 0) { ++ if (CompareMem(&(list[i].Type), &CertType, ++ sizeof(EFI_GUID)) == 0) { + CertList->SignatureListSize = list[i].MokSize + + sizeof(EFI_SIGNATURE_LIST) + + sizeof(EFI_GUID); +@@ -1100,7 +1102,8 @@ static void delete_cert (void *key, UINT32 key_size, + int i; + + for (i = 0; i < mok_num; i++) { +- if (CompareGuid(&(mok[i].Type), &CertType) != 0) ++ if (CompareMem(&(mok[i].Type), &CertType, ++ sizeof(EFI_GUID)) != 0) + continue; + + if (mok[i].MokSize == key_size && +@@ -1151,7 +1154,7 @@ static void delete_hash_in_list (EFI_GUID Type, UINT8 + sig_size = hash_size + sizeof(EFI_GUID); + + for (i = 0; i < mok_num; i++) { +- if ((CompareGuid(&(mok[i].Type), &Type) != 0) || ++ if ((CompareMem(&(mok[i].Type), &Type, sizeof(EFI_GUID)) != 0) || + (mok[i].MokSize < sig_size)) + continue; + +@@ -1322,7 +1325,8 @@ static EFI_STATUS delete_keys (void *MokDel, UINTN Mok + + /* Search and destroy */ + for (i = 0; i < del_num; i++) { +- if (CompareGuid(&(del_key[i].Type), &CertType) == 0) { ++ if (CompareMem(&(del_key[i].Type), &CertType, ++ sizeof(EFI_GUID)) == 0) { + delete_cert(del_key[i].Mok, del_key[i].MokSize, + mok, mok_num); + } else if (is_sha2_hash(del_key[i].Type)) {