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=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27981 invoked from network); 28 Jun 2020 14:32:21 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 28 Jun 2020 14:32:21 -0000 Received: (qmail 25830 invoked by alias); 28 Jun 2020 14:32:12 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: Sender: zsh-workers@zsh.org X-Seq: 46160 Received: (qmail 14253 invoked by uid 1010); 28 Jun 2020 14:32:12 -0000 X-Qmail-Scanner-Diagnostics: from out1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25850. spamassassin: 3.4.4. Clear:RC:0(66.111.4.25):SA:0(-2.6/5.0):. Processed in 4.891821 secs); 28 Jun 2020 14:32:12 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeliedgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfgjfhfogggtgfesthhqtddtredtjeenucfhrhhomhepffgrnhhi vghlucfuhhgrhhgrfhcuoegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvgeqne cuggftrfgrthhtvghrnhephfdtteefheevuedthedutdeifeegteettdejtdffheduieei jeelteetkeduteehnecukfhppeejledrudejiedrfeelrdeileenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegurdhssegurghnihgvlhdrshhh rghhrghfrdhnrghmvg X-ME-Proxy: Date: Sun, 28 Jun 2020 14:31:27 +0000 From: Daniel Shahaf To: Jens Staal Cc: zsh-workers@zsh.org Subject: Re: best way to disable PRIVILEGED? Message-ID: <20200628143127.11396dc2@tarpaulin.shahaf.local2> In-Reply-To: <20200628121011.22lv3n75sj2j5qhc@Hugin> References: <20200628121011.22lv3n75sj2j5qhc@Hugin> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Jens Staal wrote on Sun, 28 Jun 2020 14:10 +0200: > the zsh executes but with the error: "zsh: error on TTY read: permission = denied" >=20 > One of the hacks I did was to redefine seteuid to setuid. I am not sure i= f that > would be the reason for the error Set a breakpoint on seteuid and check whether it gets hit. If it does, we can take it from there. > A logical first thing to try however is to follow the instructions in > zsh_system.h and remove the seteuid hack and disable PRIVILEGED. >=20 I don't see any scenario in which the PRIVILEGED option causes the error, notwithstanding your hack. (The only things special about PRIVILEGED are that it's initialized to true in some cases and that unsetting it changes the real, saved, and effective UIDs. Your hack won't break these. In fact, I'm having trouble seeing what it _could_ break that zsh does. The best I've come up with is launching zsh with different real and effective UIDs and then running =C2=ABEUID=3D$EUID; UID=3D$UID=C2=BB. = Pretty sure you aren't doing that.) Cheers, Daniel