From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Andrew Parker <andrew.j.c.parker@gmail.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Thoughts on protecting against PATH interception via user owned profiles
Date: Sun, 15 Dec 2019 15:43:14 +0100 [thread overview]
Message-ID: <CAN=4vMrcbVGp5P0DQ5MB4O7agzzW8iPMnjmFJxvN0WwdqomAtw@mail.gmail.com> (raw)
In-Reply-To: <CAG78ipXk4PBboU0c0A+Y7y6sLgb0WgHjFQZqHSboXNDbSc-1qQ@mail.gmail.com>
On Sun, Dec 15, 2019 at 3:31 PM Andrew Parker
<andrew.j.c.parker@gmail.com> wrote:
>
> Oh man. Back at keyboard now. I see this is nothing zsh specific. The solution was right in front of me all the time. Just exit 1 from /etc/profile will work in bash.
Note that /etc/profile is sourced by bash only when starting a login
shell. It's not sourced when connecting over SSH, when running
non-interactively or when starting an interactive shell without
`--login`. Many (most? all?) graphical terminals start non-interactive
shell when opening a new tab.
All zsh processes start by sourcing /etc/zshenv (the actual location
is hard-coded in the binary and can be overridden when building zsh)
but there is no equivalent file for bash.
I don't know if this makes any difference to your defense strategy but
thought it might be worth mentioning.
Roman.
next prev parent reply other threads:[~2019-12-15 21:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-15 6:27 Andrew Parker
2019-12-15 7:14 ` Daniel Shahaf
2019-12-15 7:57 ` Andrew Parker
2019-12-15 8:49 ` Daniel Shahaf
2019-12-15 17:42 ` Lewis Butler
2019-12-15 18:57 ` Grant Taylor
2019-12-15 19:47 ` Bart Schaefer
2019-12-17 13:34 ` Andrew Parker
2019-12-15 8:41 ` Roman Perepelitsa
2019-12-15 8:49 ` Andrew Parker
2019-12-15 14:31 ` Andrew Parker
2019-12-15 14:43 ` Roman Perepelitsa [this message]
2019-12-17 13:35 ` Andrew Parker
2019-12-16 4:10 ` Daniel Shahaf
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='CAN=4vMrcbVGp5P0DQ5MB4O7agzzW8iPMnjmFJxvN0WwdqomAtw@mail.gmail.com' \
--to=roman.perepelitsa@gmail.com \
--cc=andrew.j.c.parker@gmail.com \
--cc=zsh-users@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).