Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jun 2019 13:32:34 +0000 (UTC)
From:      =?UTF-8?Q?Vin=c3=adcius_Zavam?= <egypcio@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r505089 - in head/sysutils/shim: . files
Message-ID:  <201906251332.x5PDWYTG093200@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906251332.x5PDWYTG093200>