From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15846 invoked by alias); 6 Jan 2016 01:59:08 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21119 Received: (qmail 10127 invoked from network); 6 Jan 2016 01:59:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,HTML_MESSAGE, HTML_OBFUSCATE_20_30,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=zsaVSK+orUJSTRHs/ZHzi7zLxAHpcwAFx7sEzgbx8R4=; b=lFNpeLOwNtPghVwOSOrtVyvT9362vRQas1ftpUGQ2aaoEGXIZ0WLzqKtHptwtnk9gq jcdCj43eB47LK7Be+rdzq1msUpcWQUR/xJsTX1h+Nnvi0TOKltbeTDM6WxVerWyF8WcW VUaZQhD27Hfkj8O5wEd72ZqMTDmKnfWquQ/jVDu8P+EJpq1xbjZllnq1I9DT0XnF/uZT +GreYxEfTMu1gqEhNSWXW9nVOTvpG66hUoUaUIiWAGcJkutGZeC4luP2OVqwD0UYGi9C p/zP+l0W6xdkahzl8Qx+FqLsj3+pTmM05V07XSUosWLGCFWmvFRcHn+CubCStkglPSvG IdQQ== X-Gm-Message-State: ALoCoQkkOfX84eNgNdijCSsP+Umn3MukHMtCpAgjq2WUcLCcPH/1gAGKThakU42TjktE3B7SVVtZzNOX0zShPvW/QyuHvPQzKg== X-Received: by 10.107.15.146 with SMTP id 18mr74667414iop.196.1452045544379; Tue, 05 Jan 2016 17:59:04 -0800 (PST) MIME-Version: 1.0 From: Nick Irvine Date: Wed, 06 Jan 2016 01:58:55 +0000 Message-ID: Subject: compinit trusts .zcompdump even when it's owned by a different user? To: zsh-users@zsh.org Content-Type: multipart/alternative; boundary=001a113ed64adef67c0528a0b236 --001a113ed64adef67c0528a0b236 Content-Type: text/plain; charset=UTF-8 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.) --001a113ed64adef67c0528a0b236--