1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 22:11:54 +02:00

15740: tolerate /usr/local directories in $fpath on Debian where root:staff 2755.

This commit is contained in:
Clint Adams 2001-09-06 20:52:21 +00:00
parent 913d8bd5b4
commit 199bccab75
2 changed files with 12 additions and 1 deletions

View file

@ -1,5 +1,9 @@
2001-09-06 Clint Adams <clint@zsh.org>
* 15740: Completion/compaudit: don't whine about
/usr/local/**/*(/) in $fpath being root:staff 2755
if we think we're on Debian.
* 15739: Completion/compaudit: use getent instead
of /etc/group if possible.

View file

@ -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}) )