Path: blob/main/website/static/security/patches/EN-14:03/pkg-en-releng-8.4.patch
18096 views
Index: etc/Makefile1===================================================================2--- etc/Makefile (revision 265457)3+++ etc/Makefile (working copy)4@@ -172,6 +172,7 @@ distribution:5${_+_}cd ${.CURDIR}/devd; ${MAKE} install6${_+_}cd ${.CURDIR}/gss; ${MAKE} install7${_+_}cd ${.CURDIR}/periodic; ${MAKE} install8+ ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install9${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install10${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall11${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap12Index: etc/mtree/BSD.root.dist13===================================================================14--- etc/mtree/BSD.root.dist (revision 265457)15+++ etc/mtree/BSD.root.dist (working copy)16@@ -52,6 +52,8 @@17weekly18..19..20+ pkg21+ ..22ppp23..24rc.d25Index: etc/mtree/BSD.usr.dist26===================================================================27--- etc/mtree/BSD.usr.dist (revision 265457)28+++ etc/mtree/BSD.usr.dist (working copy)29@@ -340,6 +340,14 @@30..31info32..33+ keys34+ pkg35+ revoked36+ ..37+ trusted38+ ..39+ ..40+ ..41locale42UTF-843..44Index: etc/pkg/FreeBSD.conf45===================================================================46--- etc/pkg/FreeBSD.conf (revision 0)47+++ etc/pkg/FreeBSD.conf (working copy)48@@ -0,0 +1,16 @@49+# $FreeBSD$50+#51+# To disable this repository, instead of modifying or removing this file,52+# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:53+#54+# mkdir -p /usr/local/etc/pkg/repos55+# echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf56+#57+58+FreeBSD: {59+ url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",60+ mirror_type: "srv",61+ signature_type: "fingerprints",62+ fingerprints: "/usr/share/keys/pkg",63+ enabled: yes64+}65Index: etc/pkg/Makefile66===================================================================67--- etc/pkg/Makefile (revision 0)68+++ etc/pkg/Makefile (working copy)69@@ -0,0 +1,10 @@70+# $FreeBSD$71+72+NO_OBJ=73+74+FILES= FreeBSD.conf75+76+FILESDIR= /etc/pkg77+FILESMODE= 64478+79+.include <bsd.prog.mk>80Index: share/Makefile81===================================================================82--- share/Makefile (revision 265457)83+++ share/Makefile (working copy)84@@ -9,6 +9,7 @@ SUBDIR= ${_colldef} \85${_dict} \86${_doc} \87${_examples} \88+ keys \89${_man} \90${_me} \91misc \92Index: share/keys/Makefile93===================================================================94--- share/keys/Makefile (revision 0)95+++ share/keys/Makefile (working copy)96@@ -0,0 +1,5 @@97+# $FreeBSD$98+99+SUBDIR= pkg100+101+.include <bsd.subdir.mk>102Index: share/keys/pkg/Makefile103===================================================================104--- share/keys/pkg/Makefile (revision 0)105+++ share/keys/pkg/Makefile (working copy)106@@ -0,0 +1,5 @@107+# $FreeBSD$108+109+SUBDIR= trusted110+111+.include <bsd.subdir.mk>112Index: share/keys/pkg/trusted/Makefile113===================================================================114--- share/keys/pkg/trusted/Makefile (revision 0)115+++ share/keys/pkg/trusted/Makefile (working copy)116@@ -0,0 +1,10 @@117+# $FreeBSD$118+119+NO_OBJ=120+121+FILES= pkg.freebsd.org.2013102301122+123+FILESDIR= /usr/share/keys/pkg/trusted124+FILESMODE= 644125+126+.include <bsd.prog.mk>127Index: share/keys/pkg/trusted/pkg.freebsd.org.2013102301128===================================================================129--- share/keys/pkg/trusted/pkg.freebsd.org.2013102301 (revision 0)130+++ share/keys/pkg/trusted/pkg.freebsd.org.2013102301 (working copy)131@@ -0,0 +1,4 @@132+# $FreeBSD$133+134+function: "sha256"135+fingerprint: "b0170035af3acc5f3f3ae1859dc717101b4e6c1d0a794ad554928ca0cbb2f438"136Index: share/man/man7/hier.7137===================================================================138--- share/man/man7/hier.7 (revision 265457)139+++ share/man/man7/hier.7 (working copy)140@@ -32,7 +32,7 @@141.\" @(#)hier.7 8.1 (Berkeley) 6/5/93142.\" $FreeBSD$143.\"144-.Dd May 25, 2008145+.Dd October 29, 2013146.Dt HIER 7147.Os148.Sh NAME149@@ -546,6 +546,16 @@ ASCII text files used by various games150device description file for device name151.It Pa info/152GNU Info hypertext system153+.It Pa keys/154+known trusted and revoked keys.155+.Bl -tag -width ".Pa keys/pkg/" -compact156+.It Pa keys/pkg/157+fingerprints for158+.Xr pkg 7159+and160+.Xr pkg 8161+.El162+.Pp163.It Pa locale/164localization files;165see166Index: usr.sbin/pkg/pkg.c167===================================================================168--- usr.sbin/pkg/pkg.c (revision 265457)169+++ usr.sbin/pkg/pkg.c (working copy)170@@ -284,13 +284,10 @@ bootstrap_pkg(void)171{172struct url *u;173FILE *remote;174- FILE *config;175- char *site;176struct dns_srvinfo *mirrors, *current;177/* To store _https._tcp. + hostname + \0 */178char zone[MAXHOSTNAMELEN + 13];179char url[MAXPATHLEN];180- char conf[MAXPATHLEN];181char abi[BUFSIZ];182char tmppkg[MAXPATHLEN];183char buf[10240];184@@ -306,7 +303,6 @@ bootstrap_pkg(void)185max_retry = 3;186ret = -1;187remote = NULL;188- config = NULL;189current = mirrors = NULL;190191printf("Bootstrapping pkg please wait\n");192@@ -387,26 +383,6 @@ bootstrap_pkg(void)193if ((ret = extract_pkg_static(fd, pkgstatic, MAXPATHLEN)) == 0)194ret = install_pkg_static(pkgstatic, tmppkg);195196- snprintf(conf, MAXPATHLEN, "%s/etc/pkg.conf",197- getenv("LOCALBASE") ? getenv("LOCALBASE") : _LOCALBASE);198-199- if (access(conf, R_OK) == -1) {200- site = strrchr(url, '/');201- if (site == NULL)202- goto cleanup;203- site[0] = '\0';204- site = strrchr(url, '/');205- if (site == NULL)206- goto cleanup;207- site[0] = '\0';208-209- config = fopen(conf, "w+");210- if (config == NULL)211- goto cleanup;212- fprintf(config, "packagesite: %s\n", url);213- fclose(config);214- }215-216goto cleanup;217218fetchfail:219@@ -423,7 +399,11 @@ cleanup:220221static const char confirmation_message[] =222"The package management tool is not yet installed on your system.\n"223-"Do you want to fetch and install it now? [y/N]: ";224+"The mechanism for doing this is not secure on FreeBSD 8. To securely install\n"225+"pkg(8), use ports from a portsnap checkout:\n"226+" # portsnap fetch extract\n"227+" # make -C /usr/ports/ports-mgmt/pkg install clean\n"228+"Do you still want to fetch and install it now? [y/N]: ";229230static int231pkg_query_yes_no(void)232233234