From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 11 Nov 2026 17:12:10 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-wr1-f63.google.com (mail-wr1-f63.google.com [209.85.221.63]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 6ABGCAj1007240 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 11 Nov 2026 17:12:10 +0100 Received: by mail-wr1-f63.google.com with SMTP id ffacd0b85a97d-4923b9fdd43sf2768146f8f.3 for ; Wed, 11 Nov 2026 08:12:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1794413525; cv=pass; d=google.com; s=arc-20260327; b=Y9esJ1X1h3G0AzJb7STa3BKjb16IMiyMGgM8S4vavP+EVwbBddPMBeOkfH6099ZYAg GwMCR4w90Zei2RSLTbhJ+CdtuLLgzW2wrjD54d19YzEZ0U+00xD4jXgiCOmBr9ixcdRt o6EeG/5LQqlW98URpT35EJDG0nfh+IWNOjrFEpL2wDd6gwQMm5DkyNox8Cx/oYF4bB/a nTnAYmjxltb1hz7++24xXV/b8+FmT7msQsqyc+B41kH44nGdK3UQrRMQzIRLe9/a8gTD DbRjEIlWwW6+P9o0pZKijALqQj/3lQtHrRubKw0KGhB5JBP0AZLJSeFsHgSRtg6J46je m/sA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :sender:dkim-signature; bh=ig8/Dpc61X/R7aMwXyZ7ZPVQOViMqUkbPdT6s+OXw8E=; fh=A07StTR53eZnejZMnHsqRq+H+aG1XJcymk+5LcLR2aA=; b=TYsqpVB20uSBnB+40boxGUFBsnTnLl2hDBkKYzd871CNr6iL/Jojzoj8xDUo80W7j4 qFyb5/xVD2atdNvjnmqG4Ad+rjBPqYRPEzeKROrr/wJIez7IpN+DHHGsBf5IPhIyUqcO EyrT4J0Sj+sTLe8BACDS0Dhi30hkFoiP9Pqlg+Q2aLtTiOzZm+TegXfmGAYOb9qiUDHf w25J88g3N/Qyjfbe+W5j33c2CTGx43h6YFjfzqOlbfJejQso2VXMifx/VkyG+KpluSv2 IvZBGm5i+bB64Wcr/nxacftw9T4If8sUQx/b0/aRMfed/Ql+HJIO5f28YvUfA78JUTRX Hltg==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20260707; t=1794413525; x=1795018325; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:content-type:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to:content-type; bh=ig8/Dpc61X/R7aMwXyZ7ZPVQOViMqUkbPdT6s+OXw8E=; b=Jz+wq6oeowa+Zio4jmtUrWTH5wnWXGWuCnVfrei3t8YDLoccMsrIx1qDMK0TYlLeQI JvNE2v0j7NfIqJ+iTXRfkfErnyHQIyLrboF7fslS74bdF1hv62fXURU5nOgSp5KHPWCv dDi6sH10D1rf1CZdcZBM6Hhon7IRnyr4MkdIlOIQ0Z2M1EoqQBV3bBv4TXGIFy4ZROX2 Thf/TQn+qxhcCv/T+TG0OF1ZRWhGERxITwl5bXjP0oQ33jnUJQiV1TJ/h8GXuUtlUSLG wcJ6EZDiwY+YoM7NPUR/yYM58LXr4/nYgM+Cb+g/uLBcwwincc3n38GiQW/mP0hynugU QuOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794413525; x=1795018325; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:content-type :in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to:content-type; bh=ig8/Dpc61X/R7aMwXyZ7ZPVQOViMqUkbPdT6s+OXw8E=; b=EnYK04f8B3yoj9GgWnNqiJpyIMrH2pqMEzgeWDclg/GcFB5HA3guclAt74GjNnw0BT /oeJZP8YEJxkrtLXphxgkNpgoaHM6W6hJ6G/Q3I2LU0eZ8/mraWMJgwJLsDYJkEpvdvn vWI43GX3WSppbl0mdYdBt6t2/f1kR217I5UlTcLM16QH6sJrHQ+58PpyFseiKmPr5Lzi EX+bUzzxXdxrfczkFeux+duevrhsRhyeQgambA+kIZhIzOhOPLIQA8Fwc4zQo2DAQlFc WBGWxRnCQmxgrSJxdU2fP25UwRc3etVs7QB7/uhUMk2J7EOjr/LDjNiRkbtDR/O2jy/L PdBw== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AL+hErEgrZBlKtjhYMyx74Co2KGVjJWgxPWjVR9vaPks3V0tPzcN3+VzL7bgyL/HODUIKLjS8ogs@ilbers.de X-Gm-Message-State: APuU4Z8OZ60mWRSapK0tXrmWJfW+A3uDf/M9YR65ZJN1peEuhuzAb0R4 qajERSL/iA1F3X+M88BHLR4JW4DxuGVUaixgUgcXOLknjh2FR3NwSt6v X-Received: by 2002:a05:600c:3486:b0:4a3:5a55:f454 with SMTP id 5b1f17b1804b1-4ba09380090mr54640345e9.19.1794413524835; Wed, 11 Nov 2026 08:12:04 -0800 (PST) X-BeenThere: isar-users@googlegroups.com; h="ATskLddw7uffCbYhxz9x+nZeE20NJXfV6yo7mw7Gyy7qzbSseQ==" Received: by 2002:a05:600c:154b:b0:4a4:df29:fcc0 with SMTP id 5b1f17b1804b1-4ba08a6a009ls11653235e9.1.-pod-prod-09-eu; Wed, 11 Nov 2026 08:12:02 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErG00xzhvW/g+sw2134nCPJuOyGfIVaiQvffHwsB0GO5kOyndguxLHmdtyincNB3YEIWWL5g7/zdya8Q@googlegroups.com X-Received: by 2002:a05:600c:19d0:b0:4a2:150f:1610 with SMTP id 5b1f17b1804b1-4ba09380561mr53405195e9.23.1794413522520; Wed, 11 Nov 2026 08:12:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1794413522; cv=none; d=google.com; s=arc-20260327; b=nLM4NMKfY+l7c41GiwC4DPx3MsWdKY2cmkV8BJLPGK8eSULtVU2tQkp4gOwF1oIKPu OFOScu8Gl76W2HgZ3x05tZ4+cbEtw/Kn5k12JzfOd3n6DWzZpbjsnNqLslCa5SBv9nn/ mMl1PQrkMBeROTdn9BEZvBTzTVzXYgiwcNAxSbrGyP99PkWR2vDoezWgBX0zjk+Fw7os TkTlHcNah83AzMAwGT/nvI9gw5Q1mEtk6rTdcQJkBZhv4xCDHEtMoHlP+b7OvnAJfZcf 4qQ5ixxu5xOlEn6iHbMkbkeSU/3fFNdWuzoM7xYuAYwnzAv3NPeekY6OUxbkg+O6ACSn Ztzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=BZuowwfYZ4LI1BmHXvXZGDJlGAkz0iBHt/le32w1ElY=; fh=wABx2nYKlagdNGsl4Dslektjmyh9xBQR4v51s15TqP0=; b=FgxoWZ6ob0tYjli0H8eYoX6shqKPEb+Xsh8UsiJQ1A0lpSP+2VdT1LHBgo3vpZ6ls9 nqzns6lHR3ixsmokYnQcGmvmKB04/iM/HZGgI/1mCozh28ISrwoiwKiFgVAVBuDQcNUV Ra/AtfCX6Qm2o8ISdET89+WL56awn80GCBaam7/Ty+kj7DD6UvtJDNphZFo0LwigFg+3 WFi/Ij04rHW/cX/h5xAAoeqBpBWlIxRGRVRvLOL1SqTy15yjPmHTIB5sZ2y968kGdPVM Z+NxFQ36qmkIhvtOFMAbiSlMq0ZumBDpdaG9RZotgzK0Ll8vD6gmA41jLTy3LCw4UGbp jkOw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-4ba08ddbd0bsi245695e9.0.2026.11.11.08.12.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Nov 2026 08:12:02 -0800 (PST) Received-SPF: pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from [192.168.178.24] (dslb-188-101-247-215.188.101.pools.vodafone-ip.de [188.101.247.215]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 6ABGA1AY007150 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 11 Nov 2026 17:10:01 +0100 Message-ID: <8bec959b-2538-44c1-94f0-3e516f0c8012@ilbers.de> Date: Wed, 11 Nov 2026 17:10:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/1] test-container: block sudo usage on rootless To: Felix Moessbauer , isar-users@googlegroups.com Cc: Clara Kowalsky References: <20261110091850.1015989-1-felix.moessbauer@siemens.com> Content-Language: en-US From: Zhihang Wei In-Reply-To: <20261110091850.1015989-1-felix.moessbauer@siemens.com> Content-Type: text/plain; charset="UTF-8"; format=flowed X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: wzh@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-TUID: BEusEoBQSmOi Applied to next, thanks. I'll bump the test-container version later. Zhihang On 11/10/26 10:18, 'Felix Moessbauer' via isar-users wrote: > In rootless mode, no sudo calls must be made. However, the kas-container > ships passwordless sudo which also works in the container. To catch the > cases where sudo is called in rootless mode, we replace it in the > container entrypoint of the test container with a stub that emits a > meaningfull error message along with a non zero exit code. > > Tested-by: Clara Kowalsky > Signed-off-by: Felix Moessbauer > --- > testsuite/dockerdata/test-container-entrypoint | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/testsuite/dockerdata/test-container-entrypoint b/testsuite/dockerdata/test-container-entrypoint > index 49771c15..1e5aec3c 100755 > --- a/testsuite/dockerdata/test-container-entrypoint > +++ b/testsuite/dockerdata/test-container-entrypoint > @@ -65,14 +65,16 @@ case "$args" in > ;; > esac > > +block_sudo=0 > case "$args" in > *"-p rootless=1"*) > + block_sudo=1 > ;; > *) > clean_rootless_files=0 > ;; > esac > -export clean_rootless_files > +export clean_rootless_files block_sudo > > mkdir /isar > > @@ -109,6 +111,19 @@ mkdir -p ${base_dir}/overlay/work > sudo mount -t overlay overlay -o lowerdir=/repo,upperdir=${base_dir}/overlay/upper,workdir=${base_dir}/overlay/work /isar > sudo mount -o bind ${base_dir} /isar/build > > +if [ "${block_sudo}" = 1 ]; then > + blocker=$(mktemp) > + cat < "${blocker}" > +#!/bin/sh > +echo "ERROR: sudo is blocked in rootless test runs: sudo \$*" >&2 > +exit 1 > +EOF > + sudo install -m 755 -o root -g root "${blocker}" /usr/bin/sudo.blocked > + rm -f "${blocker}" > + # rename, as the running sudo binary cannot be overwritten in place > + sudo mv -f /usr/bin/sudo.blocked /usr/bin/sudo > +fi > + > mkdir -p "${HOME}"/.config/avocado > cat < "${HOME}"/.config/avocado/avocado.conf > [datadir.paths] -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/8bec959b-2538-44c1-94f0-3e516f0c8012%40ilbers.de.