about summary refs log tree commit diff
path: root/Completion/compaudit
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2001-09-06 20:52:21 +0000
committerClint Adams <clint@users.sourceforge.net>2001-09-06 20:52:21 +0000
commit199bccab75dc3dca51418bb958d9a083d5c05130 (patch)
tree63125b7c59d98316e1d136379fd966d6430d7f01 /Completion/compaudit
parent913d8bd5b40fbb07826b532bc90b403be924973d (diff)
downloadzsh-199bccab75dc3dca51418bb958d9a083d5c05130.tar.gz
zsh-199bccab75dc3dca51418bb958d9a083d5c05130.tar.xz
zsh-199bccab75dc3dca51418bb958d9a083d5c05130.zip
15740: tolerate /usr/local directories in $fpath on Debian where root:staff 2755.
Diffstat (limited to 'Completion/compaudit')
-rw-r--r--Completion/compaudit9
1 files changed, 8 insertions, 1 deletions
diff --git a/Completion/compaudit b/Completion/compaudit
index 7fbb90e09..ba2d01c23 100644
--- a/Completion/compaudit
+++ b/Completion/compaudit
@@ -82,7 +82,7 @@ fi
 # 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 @@ else
   _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}) )