From: Stephane Chazelas <stephane.chazelas@gmail.com>
To: dash@vger.kernel.org
Subject: Re: % in $PATH
Date: Mon, 10 Nov 2014 22:23:32 +0000 [thread overview]
Message-ID: <20141110222332.GB3938@chaz.gmail.com> (raw)
In-Reply-To: <20141110215938.GA25437@hal.lan>
2014-11-10 22:59:38 +0100, Guido Berhoerster:
[...]
> A much nicer solution would be to do something similar to the
> original Korn shell and assign additional builtins a virtual
> path which can be freely assigned in PATH and with which they can
> be explicitly called. No more "%" in PATH and the feature can
> be retained.
[...]
Sounds to me like it's what dash does. It has %builtin (or
/%builtin) where ksh93 has /opt/ast/bin.
With ksh93, that's only for a few extra builtins that are only
enabled if you add /opt/ast/bin to $PATH (or you can call them
with "command /opt/ast/bin/cat").
I wouldn't say it's much better, it's still bad as being the
hijacking of one namespace for something else.
dash's %builtin (as opposed to /path/to/functions%func) is
potentially dangerous though because if you have that in your
$PATH, you're vulnerable to attackers planting %builtin
directories (in /tmp for instance) which will be considered by
other things than dash/ash when looking up $PATH.
That's worked around by using /%builtin instead of %builtin
though.
--
Stephane
next prev parent reply other threads:[~2014-11-10 22:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-05 11:59 % in $PATH Stephane Chazelas
2014-11-10 13:20 ` Herbert Xu
2014-11-10 21:30 ` Stephane Chazelas
2014-11-10 21:59 ` Guido Berhoerster
2014-11-10 22:23 ` Stephane Chazelas [this message]
2014-11-10 22:39 ` Guido Berhoerster
2014-11-10 23:15 ` Stephane Chazelas
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=20141110222332.GB3938@chaz.gmail.com \
--to=stephane.chazelas@gmail.com \
--cc=dash@vger.kernel.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.