From patchwork Mon Aug 13 17:20:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 144037 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3334792ljj; Mon, 13 Aug 2018 10:21:21 -0700 (PDT) X-Google-Smtp-Source: AA+uWPypVD1Vqm4AAtHV9N1GhfI9XHncGPgH/uh7Q7a04wDDwsEM+0uec03LCiy4t/FnXlwTjEhu X-Received: by 2002:a63:530b:: with SMTP id h11-v6mr17988937pgb.139.1534180881549; Mon, 13 Aug 2018 10:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534180881; cv=none; d=google.com; s=arc-20160816; b=azyMmtRZDt8XShUT9tR6s9mh0kFNoCxXVhqLGJjo68JLPJdhZdKyilBLRe3kNCiC2S dgUB+oxMhLsC1/A8tuemkrZ3S1azlzzQGfRpWswJp46FWanxGkqlKFkNmxD+ElnyZRPU zIAqQj2dFNMqyd2PM2CsfS8RmRw7bcFPxZNaE0qgMcLyHuIw35uETvQx4hy+DYsWC++b 7tCSylGv49v6eeb137K1IFvHEiT4kqwXThH6cOuIm0VreDHWvXe/pWoskgLobcS1HYFY 4VyHJz1QHpulztyMDTqQEFFpxZuCsbykSOoPxQvrbWqGFVPwYqUQGmzFmv13bXMF8YBk 8a5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=Uzi849bS3Or77+ZPlcZ0UCv4c6AW6dTZTtnDpCtrZ2s=; b=nQFxutrmMKUEzwq5PArGtaqAketjMALMaFO+faMLvpSOelbhZsLIe0HmKaupimpVS/ EqEIZuudQtNOH2Zq7kYi9LzjV7ZHMuHJBfcmvK+w4lQq67h2VluYrBShMZXRh6PCkWFz aZ5KqzIj98XSK6IXgISu7DD6XGBRvyo6DUGJWgGd2jRIJdPv4kHVh8PyNJNmKxpgOhYx 4eAFavj9I47YtMOvdc+hVKanjerSBGmTTJ9mkf7o4iZTGmd2u6tcMKC47yv37HPsyqBW YTYtkgzOpwbUNg04SKUGaXFtFTqI9cZ/QPUBhCnrBKgg/3EF6mhpgtMxMW4E5uOzO6r6 9sLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=fQjPqKux; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id g35-v6si16822538pgm.54.2018.08.13.10.21.21; Mon, 13 Aug 2018 10:21:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=fQjPqKux; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id A4C2678F63; Mon, 13 Aug 2018 17:21:18 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by mail.openembedded.org (Postfix) with ESMTP id 4992E78F5B for ; Mon, 13 Aug 2018 17:21:01 +0000 (UTC) Received: by mail-wm0-f44.google.com with SMTP id t25-v6so9581697wmi.3 for ; Mon, 13 Aug 2018 10:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=ty/l5H9CCdR0iznmgpFCcbV1lOMgOvhEtwvqyueAF4w=; b=fQjPqKuxl2AePGmmKagTybQBqZQ0Pi6hO5FkCiE35mdxHtIsZjARhG+Rby0Xhf9adr a3pCzpPQIAB8sDrOWEnPBipkcf3BM16NaVgkAgiQwLCDhLLrEiFf7xYtn4eeN+VhW+Qu aLVYmb2vsWAy/5zdK5XNh/GLvZ02PzHWWdQCn5TSjpzbhxZlfc3GZk50nZqOb6ZlkDFq N4VMBjuz4jomfWMJnWcGGF7PxYBathjsaHZeibXRD2k93ykfcDmGfPlulUYpgA1jTi39 7mJOMpvwwREvN0fyrNxZ3HeenDW4YQ4UyNW891mtDzREFFjaP9cqYTfOVsKZjlfecPFH RqiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=ty/l5H9CCdR0iznmgpFCcbV1lOMgOvhEtwvqyueAF4w=; b=fz3fOdzTtJkk/u82kVTMfYzMF5BtFhq48NWk44g2fBAulY9PkFIpkvFpA3s1XRrN0t xnLieqSnzsvCKmRylFIYk0HdIagxoE93j3oW0ULSNoVWlBiFB3g6gC1zM8vUB0LG7klz dsHNuK8Eps+KDf4wO2Kp9POA3zCBTav47Z7KYLTRiRQVysTobqtJRG2H0sUoeIQd5bUM j98uY8ENBTFy0GrvNoAnRt34JjH9aUfxYEv9zbIuGTOsKy9cw8s+FkLCnyzIqrNfWSAc CxrVe+b/MTC726wCuVpbIv/gqJXNiC98vfCU0beURc6GK+yZBclIa69RLqHfQ49nH10D XdWg== X-Gm-Message-State: AOUpUlFYUtiVNlT9iuPN9FyqRfLGGC30cxnYCN8Fpx5XSo4jKa3eZmgK v5/nge0HdMPuaNrVgRo/PpUCSLo04Wk= X-Received: by 2002:a1c:4143:: with SMTP id o64-v6mr9272754wma.123.1534180861698; Mon, 13 Aug 2018 10:21:01 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id e141-v6sm16598921wmd.32.2018.08.13.10.21.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Aug 2018 10:21:01 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Mon, 13 Aug 2018 18:20:53 +0100 Message-Id: <20180813172054.17767-2-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180813172054.17767-1-ross.burton@intel.com> References: <20180813172054.17767-1-ross.burton@intel.com> Subject: [OE-core] [PATCH 2/3] checksum: sanity check path when recursively checksumming X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org In case something goes tragically wrong, catch a request to checksum / and refuse. Signed-off-by: Ross Burton --- bitbake/lib/bb/checksum.py | 2 ++ 1 file changed, 2 insertions(+) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/bitbake/lib/bb/checksum.py b/bitbake/lib/bb/checksum.py index 84289208f44..4e1598fe835 100644 --- a/bitbake/lib/bb/checksum.py +++ b/bitbake/lib/bb/checksum.py @@ -97,6 +97,8 @@ class FileChecksumCache(MultiProcessCache): def checksum_dir(pth): # Handle directories recursively + if pth == "/": + bb.fatal("Refusing to checksum /") dirchecksums = [] for root, dirs, files in os.walk(pth): for name in files: