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=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8099 invoked from network); 28 Jun 2020 16:27:29 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 28 Jun 2020 16:27:29 -0000 Received: (qmail 12939 invoked by alias); 28 Jun 2020 16:27:18 -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: 46161 Received: (qmail 27934 invoked by uid 1010); 28 Jun 2020 16:27:18 -0000 X-Qmail-Scanner-Diagnostics: from mail-ed1-f47.google.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(209.85.208.47):SA:0(-1.8/5.0):. Processed in 1.739843 secs); 28 Jun 2020 16:27:18 -0000 X-Envelope-From: staal1978@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.208.47 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=7I6bTfvfVh/Taax8wUjW35LmHXjd9xJHwDnW5K6yvKM=; b=fKgqS/QAOepqLsJ0S8YU/ZQdgOdkDUd0AxLHjRBk1X1qbC1GagyxUOctLXDJaaKUiv 9WFPUhry4etnCepn4X+p0tVRC64cSiY7pPsVt9ZWU1i80lcB0ec688kpCADjduHBKNzv 9phVo3iUIho0SuA7PXgGjyVe6GWpJpS5O4amGV/8IozRXpAzWtPh3fP7hiVYlM9e4TkA UbOQ941piReSbEgc96Hk1tlpju47XcUV2ZuDgBMstPYO3Ez5t4EYx/upGVsfyxXlDURr hOfZK0Ak95grqwj2NktZlH1nodCEPBX15guksEssJcMYcLkyX5YIJ8WvarQTBmbfnAFi 408w== X-Gm-Message-State: AOAM532C/OmfjHmVNjoD11AzAzsEdfJ8s+ZaWoUXZtY98KwVaDkyVSGP YjStsCFURq80DB2wjdjQTG3NioKDpbE= X-Google-Smtp-Source: ABdhPJyyaGguEeMviSlIriZlm0uQUxiLtagFDfHckNd6X3b/BaXlJMthXW1oiTrDpRKSHgItqWq3mw== X-Received: by 2002:a05:6402:1a42:: with SMTP id bf2mr7360389edb.292.1593361603147; Sun, 28 Jun 2020 09:26:43 -0700 (PDT) Date: Sun, 28 Jun 2020 18:26:40 +0200 From: Jens Staal To: Daniel Shahaf Cc: zsh-workers@zsh.org Subject: Re: best way to disable PRIVILEGED? Message-ID: <20200628162640.nvd4hzn6mmunqws6@Hugin> References: <20200628121011.22lv3n75sj2j5qhc@Hugin> <20200628143127.11396dc2@tarpaulin.shahaf.local2> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200628143127.11396dc2@tarpaulin.shahaf.local2> On Sun, Jun 28, 2020 at 02:31:27PM +0000, Daniel Shahaf wrote: > 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" > > > > One of the hacks I did was to redefine seteuid to setuid. I am not sure if 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. > Thanks! If you believe that it is unlikely that this is the issue (as you mention below) I should probably first consider the other hacks done. Surprisingly few actually, but the major one might be the terminfo stubs from old pdcurses. > > A logical first thing to try however is to follow the instructions in > > zsh_system.h and remove the seteuid hack and disable PRIVILEGED. > > > > 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 «EUID=$EUID; UID=$UID». Pretty > sure you aren't doing that.) > I am at least not doing it on purpose :) There are many things about Plan9 that I do not know... I think I just went for the PRIVILEGED thing since "permission denied" sounded like something that would have to do with that. > Cheers, > > Daniel