Use pw(8) instead of grep'ing through /etc/passwd. This fixes
automatic filling of the "Originator" field for NIS users. PR: 24372
This commit is contained in:
parent
2f799208a5
commit
d143193363
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77107
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user