aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorDima Dorfman <dd@FreeBSD.org>2001-05-24 03:50:55 +0000
committerDima Dorfman <dd@FreeBSD.org>2001-05-24 03:50:55 +0000
commitd1431933638e5527f4deea3351d527303bc1bb8f (patch)
tree2f7f7588cf3a8bdc112b762c996e1c43873489e6 /gnu/usr.bin
parent2f799208a5b36010d48f5e209ad06dc583c6841d (diff)
downloadsrc-d1431933638e5527f4deea3351d527303bc1bb8f.tar.gz
src-d1431933638e5527f4deea3351d527303bc1bb8f.zip
Use pw(8) instead of grep'ing through /etc/passwd. This fixes
automatic filling of the "Originator" field for NIS users. PR: 24372
Notes
Notes: svn path=/head/; revision=77107
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/send-pr/send-pr.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/gnu/usr.bin/send-pr/send-pr.sh b/gnu/usr.bin/send-pr/send-pr.sh
index 1776e238c3ba..9a79a24dbc07 100644
--- a/gnu/usr.bin/send-pr/send-pr.sh
+++ b/gnu/usr.bin/send-pr/send-pr.sh
@@ -58,8 +58,8 @@ GNATS_SITE=freefall
# host-dependent.
MAIL_AGENT="${MAIL_AGENT:-/usr/sbin/sendmail -oi -t}"
-# How to read the passwd database.
-PASSWD="cat /etc/passwd"
+# Path to pw(8)
+PW="/usr/sbin/pw"
ECHON=bsd
@@ -97,7 +97,7 @@ else
PTEMP=`mktemp -t p` || exit 1
# Must use temp file due to incompatibilities in quoting behavior
# and to protect shell metacharacters in the expansion of $LOGNAME
- $PASSWD | grep "^$LOGNAME:" | awk -F: '{print $5}' | sed -e 's/,.*//' > $PTEMP
+ $PW usershow $LOGNAME | awk -F: '{ print $8 }' | sed -e 's/,.*//' > $PTEMP
ORIGINATOR="`cat $PTEMP`"
rm -f $PTEMP
fi