* PATCH: Debian-specific compaudit security
@ 2001-09-06 20:49 Clint Adams
2001-09-06 21:08 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Clint Adams @ 2001-09-06 20:49 UTC (permalink / raw)
To: zsh-workers
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}) )
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-09-06 21:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-06 20:49 PATCH: Debian-specific compaudit security Clint Adams
2001-09-06 21:08 ` Bart Schaefer
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).