From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by ewsd; Sun Mar 15 13:55:24 EDT 2020 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 500A7651 for <9front@9front.org>; Sun, 15 Mar 2020 13:55:21 -0400 (EDT) Received: from imap35 ([10.202.2.85]) by compute1.internal (MEProxy); Sun, 15 Mar 2020 13:55:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= mime-version:message-id:date:from:to:subject:content-type; s= fm2; bh=fPZ4rNy4VKYr/M4MbOai5Fr0bhBBEzmp9R6Wjthz69c=; b=ihHpIM32 l7xvviqWWR9Ygc9vT68RQ9TwF6xRQ2/ue6CIe9wpUqilNnUfVeHiMJVpJuGm0Z7q QYGH+S+pUGfKtR2eBfOMmif0VNC0k3U8UkfWbE7zjOe7tTdEO0PjbrUUu48VV/co WrQGY6jo7IlSxi3dNxbrbCVn3KKZZw842ZhhLHCBGDlzzf1cpkWKXwIeRXsN90Sg hKgEBGNjl0bdVZszPeQs5VMl79bE9+v0kKq4j6wTASw2PBiM8kwa8OR80uLpH5UA HOXHqvdF8wNwoI5OeY8L9hNuQUWdk4XrucE9WTAB9id1q7YBFuqOwRLfbTwddBF4 pf4c0VMajof3Aw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=fPZ4rNy4VKYr/M4MbOai5Fr0bhBBE zmp9R6Wjthz69c=; b=CKG4kWMo84g0UhHKhWgTtcwvV9spw0vQQqPNKDaOn254a nPFrEttpDmBvDCuct6NpKNCHqey6W116X+MDlr1eTjm1C6g2z1an9vwefm3eIgZa xjGImv94CaBHdgoPXzm9eHZ0c8LtseVsZ+I3FyirruTI1jo9xmO0Di9grcdkWzJb x7GZWeOpOuSdPt5xxdxdyjexiKgXfoexcrs7ZMAxUz95pUW4Kqt66q/3Jnds9LCn hLEqYi3cqtUstsgu2EH3K53NWwB719iTwxsTmAuXBY6RdTQdFTTfyKCm0LywEr8N TRjy51CdHMDyXZO+14kOeptMPYZpiCWNqaOAd9dKw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudefuddguddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfffhffvufgtsehttdertd erredtnecuhfhrohhmpedfgfhthhgrnhcuifgrrhguvghnvghrfdcuoegvvghkvggvheej sehfrghsthhmrghilhdrfhhmqeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegvvghkvggvheejsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id B44D114C019F; Sun, 15 Mar 2020 13:55:20 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-991-g5a577d3-fmstable-20200305v3 Mime-Version: 1.0 Message-Id: Date: Sun, 15 Mar 2020 17:55:00 +0000 From: "Ethan Gardener" To: 9front@9front.org Subject: test -x broken & rc-httpd has broken workaround Content-Type: text/plain List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: asynchronous module cache YAML reduce/map firewall-scale optimizer term% test -x static ; echo $status test 13436: false term% ls -ld static d-rwxrwxr-x M 24 ethan adm 0 Mar 15 14:58 static term% man 1 test | grep -- -x -x file True if the file exists and has execute permis- term% /rc/bin/rc-httpd/handlers/dir-index has a broken workaround for this. the workaround is to omit a necessary -a like so: if(! test -r $full_path -x $full_path){ it should be: if(! test -r $full_path -a -x $full_path) { evidently, omitting -a (and) makes it default to logical or, breaking the logic of this line. (this default in the absence of -a or -o is undocumented in plan 9 & gnu.) the indended logic (with -a) is useful, it helps with debugging folder permissions.