Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Feb 2017 14:32:37 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r434959 - in head/ports-mgmt/pkg: . files
Message-ID:  <201702271432.v1REWbmg015310@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Mon Feb 27 14:32:36 2017
New Revision: 434959
URL: https://svnweb.freebsd.org/changeset/ports/434959

Log:
  Fix signing_command something saving a truncated signature in the file
  as a result pkg will reject any repository signed

Added:
  head/ports-mgmt/pkg/files/patch-signing_command   (contents, props changed)
Modified:
  head/ports-mgmt/pkg/Makefile

Modified: head/ports-mgmt/pkg/Makefile
==============================================================================
--- head/ports-mgmt/pkg/Makefile	Mon Feb 27 14:30:10 2017	(r434958)
+++ head/ports-mgmt/pkg/Makefile	Mon Feb 27 14:32:36 2017	(r434959)
@@ -2,7 +2,7 @@
 
 PORTNAME=	pkg
 DISTVERSION=	1.10.0
-PORTREVISION=	1
+PORTREVISION=	2
 _PKG_VERSION=	${DISTVERSION}
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	\

Added: head/ports-mgmt/pkg/files/patch-signing_command
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/ports-mgmt/pkg/files/patch-signing_command	Mon Feb 27 14:32:36 2017	(r434959)
@@ -0,0 +1,20 @@
+commit df567e873326532a96de420e6953d7111f446cff
+Author: Baptiste Daroussin <bapt@FreeBSD.org>
+Date:   Mon Feb 27 14:31:48 2017 +0100
+
+    Use binary copy instead of printf to fix issues with pkg repo
+    signing_command when the signature contains \0
+
+diff --git libpkg/pkg_repo_create.c libpkg/pkg_repo_create.c
+index ac69e06c..1dab735c 100644
+--- libpkg/pkg_repo_create.c
++++ libpkg/pkg_repo_create.c
+@@ -822,7 +822,7 @@ pkg_repo_sign(char *path, char **argv, int argc, UT_string **sig, UT_string **ce
+ 			break;
+ 		}
+ 		if (buf != NULL)
+-			utstring_printf(buf, "%s", line);
++			utstring_bincpy(buf, line, linelen);
+ 	}
+ 
+ 	if (pclose(fp) != 0) {



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