From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Jens Staal <staal1978@gmail.com>
Cc: zsh-workers@zsh.org
Subject: Re: best way to disable PRIVILEGED?
Date: Sun, 28 Jun 2020 14:31:27 +0000 [thread overview]
Message-ID: <20200628143127.11396dc2@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <20200628121011.22lv3n75sj2j5qhc@Hugin>
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.
> 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.)
Cheers,
Daniel
next prev parent reply other threads:[~2020-06-28 14:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-28 12:10 Jens Staal
2020-06-28 14:31 ` Daniel Shahaf [this message]
2020-06-28 16:26 ` Jens Staal
2020-06-29 6:55 ` Jens Staal
2020-06-28 17:06 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200628143127.11396dc2@tarpaulin.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--cc=staal1978@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).