From 913d8bd5b40fbb07826b532bc90b403be924973d Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Thu, 6 Sep 2001 20:17:12 +0000 Subject: 15739: use getent instead of /etc/group if possible --- Completion/compaudit | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Completion/compaudit') diff --git a/Completion/compaudit b/Completion/compaudit index f03949822..7fbb90e09 100644 --- a/Completion/compaudit +++ b/Completion/compaudit @@ -15,6 +15,8 @@ compaudit() { # Define and then call emulate -L zsh setopt extendedglob +[[ -x /usr/bin/getent ]] || getent() { cat /etc/$1 } + # The positional parameters are the directories to check, else fpath. if (( $# )); then local _compdir='' @@ -87,7 +89,7 @@ while IFS=: read GROUP _i_pw _i_gid GROUPMEM; do else (( _i_gid == EGID )) && break # Somewhat arbitrary fi -done < /etc/group +done <<(getent group) # We search for: # - world/group-writable directories in fpath not owned by root and the user -- cgit 1.4.1