From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6626616999001718784 X-Received: by 2002:a2e:9902:: with SMTP id v2-v6mr896073lji.6.1542879501656; Thu, 22 Nov 2018 01:38:21 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:554c:: with SMTP id j73-v6ls1148638ljb.4.gmail; Thu, 22 Nov 2018 01:38:21 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vgy/IcKN+APDEKJdO1ccf7XFd4NE1TbrMtGBSjzKyaB8+fOC2V2HpnAbjFUAw7AR/TNTcd X-Received: by 2002:a2e:7402:: with SMTP id p2-v6mr949622ljc.18.1542879501227; Thu, 22 Nov 2018 01:38:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542879501; cv=none; d=google.com; s=arc-20160816; b=TXDDY5JiFknBI3D7SBUkqTODzAgu53t3plwyGTlOO4BiKunzHGQsuZF2s5Vp0eCBSj JOArv2FwHedAnYLcLKL3Opz7WxfoMWUmtN0FKnOS8OjgiPDCrHJIR3ErQl+3Aa4Avx/Y nMLWtTe7UQT9pBlqrc7fSK8FwXC8Wq4AmUPiJvEbDz0oEwYgVrEOYX4c2ERMzyhGHKUU +eRauOfliAESYjvwqFV6arHpSJqkX0Wqr1HE4vOEG5nR1847sukEG3ZuWalEo8zkAQ8Q 29uh1MrJUFsDpXYoROSG0tKAklLW7MBKwjRnfwObc5/8Umf9VRpR9fF0pLUlk3SrAe8J uslw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=ytV9KNI++Kt8kFx0kyLmPKWyEfQd32fCmAn1DZ1WzYM=; b=HDCn5eDV5hCHEHR9O4ePFLM67i9X7AHZcOYbwXYMiNVDYGeJKdHHFDRRk1wROBfq0F mkEFev72mehDB6/eud/YUFHJhh6rE8F8mC2MUseud5n9RLIBpxGa5I8vUs3RnGxImB4k foXNc36UCqI3iWmF+sPlLtSI2CM40+lmba2f0KUe6GPf+s19oQgUzp6adDPXRWteZQEH 3WebOa8B/Xu1y7qem8+6lcd4luq8TNupXGHUoLqv12bPGUITMBA9/wJ5kS6Bwja52kb9 Uipz9P9sQJ4Ir0sf4LhQbBFNjI2HmLko/Gk8ja3GX9sg2XTitQ+5rn84YOrIYVYb8a/8 2tmQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id 134si1479600lfa.1.2018.11.22.01.38.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Nov 2018 01:38:21 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id wAM9cKEg018625 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 22 Nov 2018 10:38:20 +0100 Received: from md1za8fc.ad001.siemens.net ([139.25.69.187]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id wAM9cKLX029641; Thu, 22 Nov 2018 10:38:20 +0100 From: Henning Schild To: isar-users@googlegroups.com Cc: Henning Schild Subject: [PATCH 2/2] buildchroot: Assert that we are one of the two valid users Date: Thu, 22 Nov 2018 10:38:18 +0100 Message-Id: <20181122093818.21909-2-henning.schild@siemens.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181122093818.21909-1-henning.schild@siemens.com> References: <20181122093818.21909-1-henning.schild@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: 6YerBNQeWK/+ Everything we do inside the buildchroot should be done as "root:root" or "builder:builder" and we depend on "builder:builder" being in sync with the ids in the system we chroot from. This assertion will find violations or the odd case where the ids got out of sync. Signed-off-by: Henning Schild --- meta/recipes-devtools/buildchroot/files/common.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/recipes-devtools/buildchroot/files/common.sh b/meta/recipes-devtools/buildchroot/files/common.sh index ea82bf1..25b0bb6 100644 --- a/meta/recipes-devtools/buildchroot/files/common.sh +++ b/meta/recipes-devtools/buildchroot/files/common.sh @@ -7,6 +7,9 @@ set -e printenv | grep -q BB_VERBOSE_LOGS && set -x +# assert we are either "root:root" or "builder:builder" +[ $( id -un ) = "builder" -a $( id -un ) = "builder" ] || [ $( id -un ) = "root" -a $( id -un ) = "root" ] + # Create human-readable names target_arch=$2 -- 2.19.1