Date: Tue, 30 Oct 2012 03:21:32 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r242337 - stable/7/gnu/usr.bin/send-pr Message-ID: <201210300321.q9U3LWZl003723@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler Date: Tue Oct 30 03:21:31 2012 New Revision: 242337 URL: http://svn.freebsd.org/changeset/base/242337 Log: MFC r241857: Add support for the "&" character in usernames. Charlie & finally has his last name. PR: gnu/37910 Approved by: cperciva (implicit) Modified: stable/7/gnu/usr.bin/send-pr/send-pr.sh Directory Properties: stable/7/gnu/usr.bin/send-pr/ (props changed) Modified: stable/7/gnu/usr.bin/send-pr/send-pr.sh ============================================================================== --- stable/7/gnu/usr.bin/send-pr/send-pr.sh Tue Oct 30 03:21:28 2012 (r242336) +++ stable/7/gnu/usr.bin/send-pr/send-pr.sh Tue Oct 30 03:21:31 2012 (r242337) @@ -23,7 +23,7 @@ # $FreeBSD$ # The version of this send-pr. -VERSION=3.113 +VERSION=3.114 # The submitter-id for your site. # "current-users" is the only allowable value for FreeBSD. @@ -92,11 +92,16 @@ elif [ -f $HOME/.fullname ]; then ORIGINATOR="`sed -e '1q' $HOME/.fullname`" else PTEMP=`mktemp -t p` || exit 1 + PTEMP2=`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 - $PW usershow $LOGNAME | awk -F: '{ print $8 }' | sed -e 's/,.*//' > $PTEMP + $ECHON1 $LOGNAME | awk '{print toupper(substr($1,1,1))substr($1,2)}' > $PTEMP2 + ICLOGNAME="`cat $PTEMP2`" + $PW usershow $LOGNAME | awk -F: '{ print $8 }' \ + | sed -e "s/\&/$ICLOGNAME/" \ + | sed -e 's/,.*//' > $PTEMP ORIGINATOR="`cat $PTEMP`" - rm -f $PTEMP + rm -f "$PTEMP" "$PTEMP2" fi FROM="$ORIGINATOR <$LOGNAME>"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210300321.q9U3LWZl003723>