Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: compinit trusts .zcompdump even when it's owned by a different user?
- X-seq: zsh-users 21122
- From: Nick Irvine <nfirvine@xxxxxxxxxxxx>
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>, zsh-users@xxxxxxx
- Subject: Re: compinit trusts .zcompdump even when it's owned by a different user?
- Date: Wed, 6 Jan 2016 15:41:29 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nfirvine-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=0AZNISDtUTOkXD9JIYnibURQxkeQkFaH8uX1LFez8hQ=; b=SdeUntyDWwWv1KyLn28Uxs2JXmpvZFnT4k+ZjMat1hpkacqiEwNFwhK4oTMjrIRZxq cfVQ7fNgsYv0AR1dm3LtbbRLD/C3EWsLnqNGRsWRITkAleok4XCtc41Y17V+ZrKpcAx+ R4UtNXV/Gj4NEV1IwCKTH905l88euYukkzE1TdPCDwVm0ZOFaLIm6OrzZHRzAwoPmsVj 7ZFiB/Bv9GGxjsdpr7dvOk20ADADoNMu58JhpUQGtSWVY8ffOlwP+1yUehgDZtVIPxlp 5QTRzJLQn4SNTEl+TKrzAQxvzmzyFIa8VfUkEor6VFmz++oooSZYLSgGfhj8zjnFdFpL /lFg==
- In-reply-to: <20160106093659.2cd1ad5d@pwslap01u.europe.root.pri>
- 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
- References: <CAEiyHik4aCgcHhadAN_ApdpLBW=K_Dzez4mi4RgkLeE7psch3g@mail.gmail.com> <20160106093659.2cd1ad5d@pwslap01u.europe.root.pri>
>
> The standard fix for this is to point different users at different
> files. Run compinit with the -d option, e.g.
>
> compinit -d ~/.compdump_${USER}
>
> This is the only way you're going to have two users in the same area
> with the same basic environment (home directory in particular)
> co-existing (regardless of compaudit).
>
I'm inclined to agree. I'm using prezto and they do compinit for you. Am
trying to convince maintainer that a -d is a good idea.
The security issue is a separate one and I don't have a glib answer to
> that. I think the assumption has been the dump file, unlike the
> contents of your $fpath, will always be written in an area to which no
> one other than you and the superuser has access, unless you've
> explicitly given it to someone. Certainly, as currently implemented,
> compaudit is really there to check for zsh functions you don't want to
> autoload owing to the fact that $fpath might point at anything --- not as
> a security check for files in your own area, which is a whole different
> ball game. If you're worried about the dump file, why are .zshrc or
> .zshenv, typically in the same area, not even more of a worry?
>
Yep, good points. It's more a matter of my expectations: I didn't expect
zsh to trust a cache owner by another, so it added to my confusion.
Anyway...
After some more debugging, I found out that awscli's zsh completion script
(which I was sourcing) was causing compinit to be run again, causing havoc.
So I've fixed my problem (in that I can't repro it now). Not sure if
there's still anything to be done here or not.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author