zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <clint@zsh.org>
To: zsh-workers@sunsite.dk
Subject: PATCH: Debian-specific compaudit security
Date: Thu, 6 Sep 2001 16:49:09 -0400	[thread overview]
Message-ID: <20010906164909.A25119@dman.com> (raw)

Debian policy requires that /usr/local/share/zsh/site-functions (or
equivalent) be root:staff mode 2775.

compaudit will complain if this is the case and the aforementioned
directory is in $fpath, so this patch special-cases /usr/local
directories when /etc/debian_version is present.

This will still cause problems when non-root-owned files are
added, but I'm less comfortable ignoring those.

I imagine this should be more generic in at least one way.

Index: Completion/compaudit
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/compaudit,v
retrieving revision 1.4
diff -u -r1.4 compaudit
--- Completion/compaudit	2001/09/06 20:17:14	1.4
+++ Completion/compaudit	2001/09/06 20:42:03
@@ -82,7 +82,7 @@
 # by NFS group sharing with an untrustworthy machine).  So we must assume
 # that this has not happened, and pick the best group.
 
-local GROUP GROUPMEM _i_pw _i_gid
+local GROUP GROUPMEM _i_pw _i_gid _i_ulwdirs
 while IFS=: read GROUP _i_pw _i_gid GROUPMEM; do
   if (( UID == EUID )); then
     [[ $GROUP == $LOGNAME ]] && break
@@ -108,6 +108,13 @@
   _i_wdirs=( ${^fpath}(Nf:g+w:,f:o+w:,^u0u${EUID})
              ${^fpath}/..(Nf:g+w:,f:o+w:,^u0u${EUID}) )
 fi
+
+if [[ -f /etc/debian_version ]]
+then
+_i_ulwdirs=( ${(M)_i_wdirs:#/usr/local/*} )
+_i_wdirs=( ${_i_wdirs:#/usr/local/*} ${^_i_ulwdir}(Nf:g+ws:^g:staff:,f:o+w:,^u0) )
+fi
+
 _i_wdirs=( $_i_wdirs ${^fpath}.zwc^([^_]*|*~)(N^u0u${EUID}) )
 _i_wfiles=( ${^fpath}/^([^_]*|*~)(N^u0u${EUID}) )
 


             reply	other threads:[~2001-09-06 20:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-06 20:49 Clint Adams [this message]
2001-09-06 21:08 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010906164909.A25119@dman.com \
    --to=clint@zsh.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).