From owner-freebsd-bugs Thu May 9 15:20:40 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0B4EB37B405 for ; Thu, 9 May 2002 15:20:02 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g49MK1O45430; Thu, 9 May 2002 15:20:01 -0700 (PDT) (envelope-from gnats) Received: from smarthost-1.mail.telinco.net (smarthost-1.mail.telinco.net [212.1.128.90]) by hub.freebsd.org (Postfix) with ESMTP id 85C7B37B49C for ; Thu, 9 May 2002 15:12:54 -0700 (PDT) Received: from dial-212-1-141-116.access.uk.tiscali.com ([212.1.141.116] helo=basilisk.locus) by smarthost-1.mail.telinco.net with esmtp (Exim 3.22 #1) id 175w9c-000JZk-00 for FreeBSD-gnats-submit@freebsd.org; Thu, 09 May 2002 23:12:52 +0100 Received: from basilisk.locus (localhost [127.0.0.1]) by basilisk.locus (8.12.3/8.12.3) with ESMTP id g49MDF8v075627 for ; Thu, 9 May 2002 23:13:15 +0100 (BST) (envelope-from harry@basilisk.locus) Received: (from harry@localhost) by basilisk.locus (8.12.3/8.12.3/Submit) id g49MCeM3075624; Thu, 9 May 2002 23:12:40 +0100 (BST) Message-Id: <200205092212.g49MCeM3075624@basilisk.locus> Date: Thu, 9 May 2002 23:12:40 +0100 (BST) From: Harry Newton Reply-To: Harry Newton To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: gnu/37910: PATCH: make send-pr(1) respect &'s in /etc/{master.}passwd Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 37910 >Category: gnu >Synopsis: PATCH: make send-pr(1) respect &'s in /etc/{master.}passwd >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Thu May 09 15:20:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Harry Newton >Release: FreeBSD 4.6-PRERELEASE i386 >Organization: GAUDEAMUS >Environment: System: FreeBSD basilisk.locus 4.6-PRERELEASE FreeBSD 4.6-PRERELEASE #0: Tue May 7 21:23:01 BST 2002 root@basilisk.locus:/usr/obj/usr/src/sys/BASILISK i386 >Description: The password files /etc/passwd and /etc/master.passwd allow ampersands (&) in the GECOS fields to represent the username, initially capitalised ( see passwd(5) ). This convention isn't respected by send-pr(1): the enclosed path fixes this. >How-To-Repeat: send-pr >Fix: *** send-pr Thu May 9 22:19:59 2002 --- send-pr.new Thu May 9 22:52:55 2002 *************** *** 92,102 **** ORIGINATOR="`sed -e '1q' $HOME/.fullname`" 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 ! $PW usershow $LOGNAME | awk -F: '{ print $8 }' | sed -e 's/,.*//' > $PTEMP ORIGINATOR="`cat $PTEMP`" rm -f $PTEMP fi FROM="$ORIGINATOR <$LOGNAME>" --- 92,108 ---- 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 ! $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 $PTEMP2 fi FROM="$ORIGINATOR <$LOGNAME>" >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message