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

Re: Zsh configuration files



On Mon, Nov 24, 2008 at 5:33 PM, Benjamin R. Haskell <zsh@xxxxxxxxxx> wrote:

> Long ago, I set some things up for easily sharing my Zsh startup scripts
> between various computers I use. I did most of this when I was still fairly
> new to Zsh, so some things might have easier/better ways to do them, but
> this is how I set mine up. Some features:
>
> 1. Automatically runs any files matching .zsh_* in my home dir, excluding
> vim swap files
>
> 2. For running as root, I can just link my normal-user .zshrc and .zshenv
> files, and it'll detect that they're linked, and use the .zsh_* files from
> my normal-user directory

That sounds really dangerous.  You're offering a hook for someone to
execute arbitrary code as root.  If someone breaks your user account
they could for example add a file in your home directory that resets
the root password or does some other really mean things.  If you want
root to have the same setup as your regular user you should put it
somewhere that only root can write.

Other than that I have a very familiar setup with Zsh initialization
files contained in a Git repository in /usr/local/etc/zsh so that I
can keep changes logged and synced between separate systems.

Regards,
Allan



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