From c5e2c2e9f8b3eac9e4e520559524bd8df69fb549 Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Mon, 22 Mar 2010 07:50:51 +1100 Subject: [PATCH] QA /technical/2008/09/zsh-cygwin-and-insecure-directories/ --- .../zsh-cygwin-and-insecure-directories.html | 59 ++++++++++--------- output/css/screen.css | 4 +- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/content/technical/2008/09/zsh-cygwin-and-insecure-directories.html b/content/technical/2008/09/zsh-cygwin-and-insecure-directories.html index cde808b..fd7d30c 100644 --- a/content/technical/2008/09/zsh-cygwin-and-insecure-directories.html +++ b/content/technical/2008/09/zsh-cygwin-and-insecure-directories.html @@ -1,44 +1,45 @@ -In order to cope with having to use Windows at work I run Cygwin. My shell of choice is zsh. For whatever reason the Cygwin package of zsh installs with a serious of directories that the zsh completion system deems to be insecure and it makes sure you know this. Each time a new shell is opened (in my case through a Windows native rxvt terminal) I would receive the following warning: +In order to cope with having to use Windows at work I run Cygwin. My shell of choice is zsh. For whatever reason the Cygwin package of zsh installs with a series of directories that the zsh completion system deems to be insecure and it makes sure you know this. Each time a new shell is opened (in my case through a Windows native rxvt terminal) I would receive the following warning: -Ignore insecure directories and continue [ny]? + Ignore insecure directories and continue [ny]? Pressing 'y' becomes a bit tedious after a while so I decided to track down these insecure directories and fix them. + man zshcompsys reveals the following about the security check: -
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. - -The security check can be retried at any time by running the function -compaudit. -
+> 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. +> +> The security check can be retried at any time by running the function +> compaudit. Running compaudit revealed the following: -% compaudit -There are insecure directories: -/usr/share/zsh/site-functions -/usr/share/zsh/4.3.4/functions -/usr/share/zsh -/usr/share/zsh/4.3.4 + + % compaudit + There are insecure directories: + /usr/share/zsh/site-functions + /usr/share/zsh/4.3.4/functions + /usr/share/zsh + /usr/share/zsh/4.3.4 Examining the permissions on these directories showed they were all group writable. -% ls -ld /usr/share/zsh/site-functions -drwxrwx---+ 2 wmoore mkgroup-l-d 0 Sep 4 10:54 /usr/share/zsh/site-functions + % ls -ld /usr/share/zsh/site-functions + drwxrwx---+ 2 wmoore mkgroup-l-d 0 Sep 4 10:54 /usr/share/zsh/site-functions Stripping them of the group write permission fixed the problem and made starting a new shell a little more pleasant. -% chmod g-w /usr/share/zsh/site-functions /usr/share/zsh/4.3.4/functions /usr/share/zsh /usr/share/zsh/4.3.4 -% compaudit -% - + % chmod g-w /usr/share/zsh/site-functions /usr/share/zsh/4.3.4/functions /usr/share/zsh /usr/share/zsh/4.3.4 + % compaudit + % -Update: kylexlau provides this one line solution for correcting to permissions on each of the directories that compaudit returns: -compaudit | xargs chmod g-w \ No newline at end of file +**Update:** _kylexlau_ provides this one line solution for correcting to permissions on each of the directories that compaudit returns: + + compaudit | xargs chmod g-w diff --git a/output/css/screen.css b/output/css/screen.css index 86c8a89..e7a87d3 100644 --- a/output/css/screen.css +++ b/output/css/screen.css @@ -95,8 +95,8 @@ sup { font-size: 0.8em; } -pre,code { - font-size: 12px; +pre,code,tt { + font-size: 13px; font-family: Consolas, "Andale Mono", "Liberation Mono", Menlo, Monaco, "Bitstream Vera Sans Mono", fixed; }