From owner-svn-src-all@FreeBSD.ORG Tue Oct 30 03:21:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 522F8B58; Tue, 30 Oct 2012 03:21:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A13B8FC08; Tue, 30 Oct 2012 03:21:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9U3LOnW003640; Tue, 30 Oct 2012 03:21:24 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9U3LNDh003638; Tue, 30 Oct 2012 03:21:23 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210300321.q9U3LNDh003638@svn.freebsd.org> From: Eitan Adler Date: Tue, 30 Oct 2012 03:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242335 - stable/9/gnu/usr.bin/send-pr X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 03:21:24 -0000 Author: eadler Date: Tue Oct 30 03:21:23 2012 New Revision: 242335 URL: http://svn.freebsd.org/changeset/base/242335 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/9/gnu/usr.bin/send-pr/send-pr.sh Directory Properties: stable/9/gnu/usr.bin/send-pr/ (props changed) Modified: stable/9/gnu/usr.bin/send-pr/send-pr.sh ============================================================================== --- stable/9/gnu/usr.bin/send-pr/send-pr.sh Tue Oct 30 03:03:37 2012 (r242334) +++ stable/9/gnu/usr.bin/send-pr/send-pr.sh Tue Oct 30 03:21:23 2012 (r242335) @@ -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>"