From harry_newton@telinco.co.uk  Thu May  9 15:13:28 2002
Return-Path: <harry_newton@telinco.co.uk>
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 <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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 <harry_newton@telinco.co.uk>
Reply-To: Harry Newton <harry_newton@telinco.co.uk>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: PATCH: make send-pr(1) respect &'s in /etc/{master.}passwd
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         37910
>Category:       gnu
>Synopsis:       [patch] make send-pr(1) respect &'s in /etc/{master.}passwd
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    eadler
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 09 15:20:01 PDT 2002
>Closed-Date:    Thu Nov 15 04:47:05 UTC 2012
>Last-Modified:  Thu Nov 15 04:47:12 UTC 2012
>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:

From: Ceri Davies <ceri@FreeBSD.org>
To: FreeBSD Gnats Submit <freebsd-gnats-submit@FreeBSD.org>
Cc:  
Subject: Re: gnu/37910: PATCH: make send-pr(1) respect &'s in /etc/{master.}passwd
Date: Sun, 8 Jun 2003 18:43:28 +0100

 Adding to audit trail, from misfiled PR gnu/53060:
 
 Date: 08 Jun 2003 17:59:09 +0100
 From: Harry Newton <harry_newton@telinco.co.uk>
 Message-Id: <86llwcy082.fsf@basilisk.locus>
 
  In addition to this patch, I also submitted one to FSF. However,
  they are no longer maintaining GNATS 3.x ( the one used by FreeBSD ),
  so the patch has not been committed by them.
  
  Below is text of email from FSF:
  
  X-From-Line: gnats@gnu.org Thu May 22 22:29:34 2003
  Return-Path: <gnats@gnu.org>
  Received: from localhost (localhost [127.0.0.1])
  	by basilisk.locus (8.12.6/8.12.6) with ESMTP id h4MLKclV016761
  	for <harry@localhost>; Thu, 22 May 2003 22:29:34 +0100 (BST)
  	(envelope-from gnats@gnu.org)
  Envelope-to: harry_newton@telinco.co.uk
  Delivery-date: Thu, 01 May 2003 14:15:15 +0100
  Received: from pop3.telinco.co.uk [212.74.112.80]
  	by localhost with POP3 (fetchmail-6.2.0)
  	for harry@localhost (single-drop); Thu, 22 May 2003 22:29:34 +0100 (BST)
  Received: from [199.232.76.164] (helo=fencepost.gnu.org)
  	by mk-mx-1.b2b.uk.tiscali.com with esmtp (TLSv1:DES-CBC3-SHA:168)
  	(Exim 4.12)
  	id 19BDu7-0007Cd-00
  	for harry_newton@telinco.co.uk; Thu, 01 May 2003 14:15:15 +0100
  Received: from gnats by fencepost.gnu.org with local (Exim 4.10)
  	id 19BDu7-0003dM-00; Thu, 01 May 2003 09:15:15 -0400
  From: yngves@sources.redhat.com
  To: yngves@sources.redhat.com, pdm-gnats@zamazal.org, gnats-prs@gnu.org,
     harry_newton@telinco.co.uk
  Subject: Re: gnats/424
  Cc: 
  X-Gnus-Mail-Source: file:/var/mail/harry
  Message-Id: <E19BDu7-0003dM-00@fencepost.gnu.org>
  Sender: Gnats Bug-Reporting System (admin) <gnats@gnu.org>
  Date: Thu, 01 May 2003 09:15:15 -0400
  Xref: basilisk.locus inbox:9866
  Lines: 21
  
  Synopsis: PATCH: make send-pr(1) respect &'s in /etc/{master.}passwd
  
  Responsible-Changed-From-To: unassigned->yngves
  Responsible-Changed-By: yngves
  Responsible-Changed-When: Thu, 01 May 2003 09:15:15 -0400
  Responsible-Changed-Why:
  -
  
  
  
  State-Changed-From-To: open->closed
  State-Changed-By: yngves
  State-Changed-When: Thu, 01 May 2003 09:15:15 -0400
  State-Changed-Why:
  Thanks for this patch. Unfortunately, GNATS 3.x is no 
  longer developed or supported. Thus, I am closing this PR.
  
  
  
  
  
  
  
  -- 
  Harry Newton
  harry_newton at telinco . co . uk
  www . gaudeamus . telinco . co . uk / html / gpg . html
Responsible-Changed-From-To: freebsd-bugs->bugmeister 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Jan 26 01:18:42 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=37910 
State-Changed-From-To: open->closed 
State-Changed-By: eadler 
State-Changed-When: Thu Nov 15 04:47:04 UTC 2012 
State-Changed-Why:  
committed r241857 r242335 r242336 r242337 

http://www.freebsd.org/cgi/query-pr.cgi?pr=37910 
Responsible-Changed-From-To: bugmeister->eadler 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Thu Nov 15 04:47:11 UTC 2012 
Responsible-Changed-Why:  
committed r241857 r242335 r242336 r242337 

http://www.freebsd.org/cgi/query-pr.cgi?pr=37910 
>Unformatted:
