Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

compinit security (Re: Simple Tip of the Day)



On Dec 3, 10:20pm, zzapper wrote:
}
} ignore insecure directories and files and continue [ny]? 
} compinit: initialization aborted
} 
} how do I get it to default to y

You can't, but you don't really want to.  An answer of "n" means abort,
and an answer of "y" means to skip reading the insecure directories.

The compsys manual section says under "Initialization":

    For security reasons compinit also checks if the completion system
    would use files not owned by root or by the current user, or files
    in directories that are world- or group-writable or that are not
    owned by root or by the current user. If such files or directories
    are found, compinit will ask if the completion system should really
    be used.  To avoid these tests and make all files found be used
    without asking, use the option -u, and to make compinit silently
    ignore all insecure files and directories use the option -i. This
    security check is skipped entirely when the -C option is given.

In other words, it's paranoid about sourcing files that might have been
created or edited by a malicious third party.



Messages sorted by: Reverse Date, Date, Thread, Author