head 1.2; access; symbols pkgsrc-2020Q2:1.1.0.28 pkgsrc-2020Q2-base:1.1 pkgsrc-2020Q1:1.1.0.8 pkgsrc-2020Q1-base:1.1 pkgsrc-2019Q4:1.1.0.30 pkgsrc-2019Q4-base:1.1 pkgsrc-2019Q3:1.1.0.26 pkgsrc-2019Q3-base:1.1 pkgsrc-2019Q2:1.1.0.24 pkgsrc-2019Q2-base:1.1 pkgsrc-2019Q1:1.1.0.22 pkgsrc-2019Q1-base:1.1 pkgsrc-2018Q4:1.1.0.20 pkgsrc-2018Q4-base:1.1 pkgsrc-2018Q3:1.1.0.18 pkgsrc-2018Q3-base:1.1 pkgsrc-2018Q2:1.1.0.16 pkgsrc-2018Q2-base:1.1 pkgsrc-2018Q1:1.1.0.14 pkgsrc-2018Q1-base:1.1 pkgsrc-2017Q4:1.1.0.12 pkgsrc-2017Q4-base:1.1 pkgsrc-2017Q3:1.1.0.10 pkgsrc-2017Q3-base:1.1 pkgsrc-2017Q2:1.1.0.6 pkgsrc-2017Q2-base:1.1 pkgsrc-2017Q1:1.1.0.4 pkgsrc-2017Q1-base:1.1 pkgsrc-2016Q4:1.1.0.2 pkgsrc-2016Q4-base:1.1; locks; strict; comment @# @; 1.2 date 2020.08.19.10.39.24; author bouyer; state dead; branches; next 1.1; commitid DGAMglRf0Jde6FkC; 1.1 date 2016.11.22.20.55.29; author bouyer; state Exp; branches; next ; commitid stCAOMdiB0Zcqavz; desc @@ 1.2 log @Remove xenkernel and xentools packages older than 4.11. They're not maintained anymore upstream, and don't build on supported NetBSD releases. @ text @$NetBSD: patch-XSA-198,v 1.1 2016/11/22 20:55:29 bouyer Exp $ Backported from: From 71a389ae940bc52bf897a6e5becd73fd8ede94c5 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 3 Nov 2016 16:37:40 +0000 Subject: [PATCH] pygrub: Properly quote results, when returning them to the caller: * When the caller wants sexpr output, use `repr()' This is what Xend expects. The returned S-expressions are now escaped and quoted by Python, generally using '...'. Previously kernel and ramdisk were unquoted and args was quoted with "..." but without proper escaping. This change may break toolstacks which do not properly dequote the returned S-expressions. * When the caller wants "simple" output, crash if the delimiter is contained in the returned value. With --output-format=simple it does not seem like this could ever happen, because the bootloader config parsers all take line-based input from the various bootloader config files. With --output-format=simple0, this can happen if the bootloader config file contains nul bytes. This is XSA-198. Signed-off-by: Ian Jackson Tested-by: Ian Jackson Reviewed-by: Andrew Cooper --- pygrub/src/pygrub.orig 2014-09-02 08:22:57.000000000 +0200 +++ pygrub/src/pygrub 2016-11-22 16:30:40.000000000 +0100 @@@@ -683,14 +683,17 @@@@ return cfg def format_sxp(kernel, ramdisk, args): - s = "linux (kernel %s)" % kernel + s = "linux (kernel %s)" % repr(kernel) if ramdisk: - s += "(ramdisk %s)" % ramdisk + s += "(ramdisk %s)" % repr(ramdisk) if args: - s += "(args \"%s\")" % args + s += "(args %s)" % repr(args) return s def format_simple(kernel, ramdisk, args, sep): + for check in (kernel, ramdisk, args): + if check is not None and sep in check: + raise RuntimeError, "simple format cannot represent delimiter-containing value" s = ("kernel %s" % kernel) + sep if ramdisk: s += ("ramdisk %s" % ramdisk) + sep @ 1.1 log @Backport upstream patches, fixing today's XSA 191, 192, 195, 197, 198. Bump PKGREVISIONs @ text @d1 1 a1 1 $NetBSD: $ @