From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7994 invoked from network); 11 Apr 2022 22:39:47 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Apr 2022 22:39:47 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1649716787; b=pKgNVgtUhpio19vLoiHYwf4tiQbvkmQY7qT+e0KoM80jPFh/I+hhSIbQpA11FaDj2iiJSUUzxh IzIqkPV8RzuNTstEtXLjpkQZeWYhDxRHJboKlOAjyz1WIvXNklLhWeUVM6/mLsvAQRYO60Xp7A 126XkKPVdmK6TyEfzKXM4qHOjZ+vzYUcq87ddF9kntEinveS5OU+oZEezgkP/84wkuR+1MI2rl WlpayKFPI5dshxEF5K9AWD1YiiuRE9rKVU7lh4JDmxIcgH46TtP7ZhgrqMaxIe9nz9vZCUyLPz OKujEIjswv96J0mqPrR0Crqa4m784xE1AtBaL4935tHtLQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f41.google.com) smtp.remote-ip=209.85.208.41; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1649716787; bh=6AUUrh/ymqKlFtFgbYQGrW81nbJff8YW9/XrrRg3IUI=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=DPtWVTBcAMz7yx7N9JwbR4/AabiWeicPWfgibTCQSNgkb/q3zIOnxLkis5xxMy9IM6IJD//otf N54LCz6HfAEmOWFEyOS9qruKbm/hHVSDPRqkE9nLLSZD2sLhlJJHS1t6yk0fDeOLpLvBxQqrpw 6HpBOJ++j3/PD9dxrOYxslBkkg3g1f9d4GXsErdma+j3qFHY0vCYBB8s6ySiei9LuZNMZaQH3O 6xj4K2VEFLNU0DVuz7KPJllbX+4kAKAqnKgaorHOPVX4c9CFIyFTt1O0h2z+F+zCIyDFN8S0NE 6Pnc/uTjhsNMyPeOLh+SnvWe+HtoooR80l016gOjPJ37xQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=4uAIT9/8LQuMciZN6XxAE5tWMnPWNvJFLoBKk4aE/Oc=; b=oKuAy1Vch7p12w2DUilXlOr3mw WjVmq9HMASGbd43/fME8vfkx2ll198kFD2fG61l837sO8SwIWFNZWLBxWL6nhICvgVAs8jad0/E80 i75R/Csm06pSgjM1HpJzvqQgQ77C8rQSKL5Ox0XIII6GmpdOnjsOLtwJo/qm6mWw1y2vzNcZf24oR EmzPK1P6rcYn+irqc5YWjTXVtg5NSCEK6VxOXbFqbh433CaqByruhXFysgrO2Oi80pbJfG4t60qJ0 SbQ05oDp67DNHfBl+rJL2C93Hx2QZthk+hhrGx2HX5UnRAE2RUKcU3nD+LSN3Ps8RZ4A6Lx90vuSj rHUZV/qg==; Received: from authenticated user by zero.zsh.org with local id 1ne2hG-000JKR-EZ; Mon, 11 Apr 2022 22:39:46 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f41.google.com) smtp.remote-ip=209.85.208.41; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ed1-f41.google.com ([209.85.208.41]:46021) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1ne2gh-000J2e-CQ; Mon, 11 Apr 2022 22:39:12 +0000 Received: by mail-ed1-f41.google.com with SMTP id v15so10188265edb.12 for ; Mon, 11 Apr 2022 15:39:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=4uAIT9/8LQuMciZN6XxAE5tWMnPWNvJFLoBKk4aE/Oc=; b=CKPGijukdEvygnD3lIZvR6ft6IbP7r5WerMNv8LxVZzs+ue/Xza2T5krlyJtwZXOgZ NIYVREyX7G/0R+GHnBmSWtOxUV+wAukBYpL9pUo5fjIybkQboQZm6Qdmjubl96pk3axl NYHq+1AeWLOu6kdXds3h9urlgEDEUDEOR/RtGNueqpaXkoU7Z7rqEf3Y9h0ovjeJkt8g ysvEWLs1Rx9GsyItkEhHpoKXqrmcB/ZRit4viSABjBphVgQ2qpoBl+tRAlBZdrimoKwd 2upaojTYN2bqHrzgA5XZMDkwup1EGXEw3LVxZoBFCSCQhZY2VPa4E2+nmZsytOhxTOVe eqoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=4uAIT9/8LQuMciZN6XxAE5tWMnPWNvJFLoBKk4aE/Oc=; b=T7K/wMRptAA71XpZSxzY7etDp0GIPvOCIY7SmFSHd7w0I8QdZH2g5OAqv9Gb3Hg3pJ pyE4B+gNbwIUqcNMtBddl0Bc+YPpNjptTF0CWCoXNIDGtFBpOYwPU/chwEwRn0zXmjhD HZGAY3j9bKq3Yfim06PZgDj1CbNbYD6zDK9CwQ4Tw2i9f8dUPc4QRhPwCuP4Pv4bqnge MJ5hXifJ9fNpgv3lPCHuFElMJg04CZMNbWjYz87T3+TJzn+DYSVjOv4njO7f6QgsoV2d J1IV094A/HjEJ5/0VUbCUd4TqTKKymkPd4D+Eu+hhjLnUhrRYkN+/liixiQrzXdaqgtV 4JUA== X-Gm-Message-State: AOAM5327ZZRuuYa1XpBmK9CDcdUmMMTpFiDVTh7/PM3T8ICQcowI4BZc GeL+KJKSxU1mhtdUo6EZ8QSAJ2Shy1wnYMgBVCIY3qY9YcwouJSx X-Google-Smtp-Source: ABdhPJwQCCnxmewdhIAkarF+pnpmr+6fMmhp2jD7qcoBCyC5UWkszZFL/CSAJjqzGpocJ6xdYuwmoEzWNHVbjJweGJk= X-Received: by 2002:a05:6402:1d4b:b0:41d:8d73:be8b with SMTP id dz11-20020a0564021d4b00b0041d8d73be8bmr1561077edb.162.1649716750627; Mon, 11 Apr 2022 15:39:10 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Mon, 11 Apr 2022 15:38:59 -0700 Message-ID: Subject: [PATCH] Re: 5.8.1.2-test - test failures running as root To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 50043 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Mon, Apr 11, 2022 at 2:14 PM Bart Schaefer wrote: > > These are probably not new; found while experimenting with reproducing > Axel's test fails. > > The first is obviously because of root's expanded privileges. The > second probably also so, just not immediately clear why. Fixed the first by just skipping the test. Fixed the second by dropping privilege and then attempting to escalate again. diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst index 72891a2a7..850a535e5 100644 --- a/Test/D02glob.ztst +++ b/Test/D02glob.ztst @@ -748,13 +748,21 @@ touch glob.tmp/secret-d$1/dir/file chmod $1 glob.tmp/secret-d$1 done - print -raC 2 -- glob.tmp/secret-*/* glob.tmp/secret-*/file + if (( EUID == 0 )); then + ZTST_skip='Not testing unreadable directories (root reads anything)' + else + print -raC 2 -- glob.tmp/secret-*/* glob.tmp/secret-*/file + fi 0:names inside unreadable directories can be globbed if searchable >glob.tmp/secret-d444/dir glob.tmp/secret-d444/file >glob.tmp/secret-s444/dir glob.tmp/secret-s444/file >glob.tmp/secret-d111/file glob.tmp/secret-s111/file - print -rC 2 -- glob.tmp/secret-*/dir/* + if (( EUID == 0 )); then + ZTST_skip='Not testing unreadable directories (root reads anything)' + else + print -rC 2 -- glob.tmp/secret-*/dir/* + fi 0:glob files in readable directories inside unreadable directories >glob.tmp/secret-d111/dir/file glob.tmp/secret-s111/dir/file diff --git a/Test/E03posix.ztst b/Test/E03posix.ztst index caab97ab6..6ac4d1732 100644 --- a/Test/E03posix.ztst +++ b/Test/E03posix.ztst @@ -153,7 +153,7 @@ F:This may also need to apply to multibyte whitespace F:POSIX has neither math functions nor floating point >42 - ARGV0=sh $ZTST_testdir/../Src/zsh -c 'EUID=10; echo "$EUID"' + ARGV0=sh $ZTST_testdir/../Src/zsh -c 'EUID=1; EUID=10; echo $EUID' -f:EUID is not a special variable >10