Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
compinit trusts .zcompdump even when it's owned by a different user?
- X-seq: zsh-users 21119
- From: Nick Irvine <nfirvine@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: compinit trusts .zcompdump even when it's owned by a different user?
- Date: Wed, 06 Jan 2016 01:58:55 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nfirvine-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to:content-type; bh=zsaVSK+orUJSTRHs/ZHzi7zLxAHpcwAFx7sEzgbx8R4=; b=W4052ZD0dVk88H1H9Z3aI2ypys+yQhVylRI/DxeBdAqKjFL2wATR/nFGIuwZJxynKx mGLKQs/y70owcybVGIg8+T94n61aWufhl0++THs/FOKr2qC2g4ElVLqPRQ+0ABZaSqZ2 XG2Rf86JxzOeB9DWCwIM9F8WOqkjAAgiWea//eEIYpiZW2wny2bC1bOIrwymsz/yYZLN 6Fidcr5Bzxq3jtDjaVkCxgb4QPJ5fYeiM8GqQNMCu1hjl/C11M/eWU57S4soqId36voD qw2x2I1C64BMt9u82xwxqnZ2HXxG9KTQsTHWNHgMDkwqHTOAhKlFGLptZm8G0+EiKBE8 rJbw==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
This may be a bug or misfeature in zsh, but I don't know it that well and I
may be misunderstanding.
compinit (the function that initializes completions) runs compaudit to
enforce a security model whereby it will only load completion functions
from directories in your $fpath that are considered "secure" (owned by root
or me, not world-writable, etc.). It will warn the user about insecure
paths and prompt to either skip them or abort. That's all well and good.
It creates a cache of the results at ~/.zcompdump. AFAICT, it is only
invalidated (i.e., deleted)*manually*.
I'm not entirely clear what's in the cache, so I can't say if this is
really a big security issue. But, at the very least, compinit will consider
the cache valid even if it's owned by a different user, thereby avoiding
loading completion functions that *are* valid for the current user but
*weren't* for the previous one.
This is happening to me every time I use sudo -s where my zsh installation
is owned by me (OS X homebrew). It writes an incomplete completion cache.
Then next shell I start, it loads the busted cache and doesn't see any
completions.
Is this my problem? ZSH's? Homebrew's?
(This is a cross-post from Stack Overflow.)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author