From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: autocompletion is broken in restricted shell
Date: Tue, 9 May 2017 22:02:47 -0700 [thread overview]
Message-ID: <170509220247.ZM7112@torch.brasslantern.com> (raw)
In-Reply-To: <11381B06-E104-4785-8BB7-AC5E5B0296F0@nexenta.com>
I know Peter already committed the patch included with this, but I think
it's worth revisiting:
On May 8, 11:38am, Jan Kryl wrote:
}
} after we updated zsh to 5.3 autocompletion stopped to work for us in
} restricted shell. This is mainly due to "38692: IFS can't be changed
} in restricted mode".
[...]
} I suppose there is a good reason why setting IFS is not allowed in
} restricted mode
If you look at workers/38692 there is a URL linking to a security exploit
that is made possible by changing $IFS.
} However at least I would like to fix another thing which breaks
} autocompletion and that is using write redirections in autocompletion
} code. That can be avoided by using 2>&- instead of 2>/dev/null.
As I said in workers/41075 I don't think this is useful. It also is
applicable only in restricted mode. Looking again at workers/38692
I quote:
>> I don't think we ever expect the completion system to work properly
>> in restricted mode, do we? I would generally expect that any
>> environment involving functions other than extremely trivial ones
>> can't rely on restricted mode.
If we're already admitting that compsys is too complex to be reliable
in restricted mode, I think we should not have applied a patch that
only matters in restricted mode and that might cause spurious errors
in the far more common case.
next prev parent reply other threads:[~2017-05-10 5:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170508093906epcas5p35e1b5c235b94e4b754107d42c915e638@epcas5p3.samsung.com>
2017-05-08 9:38 ` Jan Kryl
2017-05-08 16:48 ` Peter Stephenson
2017-05-08 18:03 ` Bart Schaefer
2017-05-10 5:02 ` Bart Schaefer [this message]
2017-05-10 8:48 ` 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=170509220247.ZM7112@torch.brasslantern.com \
--to=schaefer@brasslantern.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).