From dada@localhost.tu-graz.ac.at  Tue Feb 17 22:53:25 1998
Received: from ns1.tu-graz.ac.at (ns1.tu-graz.ac.at [129.27.2.3])
          by hub.freebsd.org (8.8.8/8.8.8) with SMTP id WAA03134
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 17 Feb 1998 22:53:17 -0800 (PST)
          (envelope-from dada@localhost.tu-graz.ac.at)
Received: from fcggsg07.icg.tu-graz.ac.at by ns1.tu-graz.ac.at with SMTP id AA14548
  (5.67c/IDA-1.5t for <FreeBSD-gnats-submit@freebsd.org>); Wed, 18 Feb 1998 07:52:54 +0100
Received: from localhost.tu-graz.ac.at (isdn105.tu-graz.ac.at [129.27.240.105])
	by fcggsg07.icg.tu-graz.ac.at (8.8.8/8.8.8) with ESMTP id HAA03203
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 18 Feb 1998 07:52:50 +0100 (MET)
Received: (from dada@localhost)
	by localhost.tu-graz.ac.at (8.8.8/8.8.5) id HAA09054;
	Wed, 18 Feb 1998 07:37:46 +0100 (CET)
Message-Id: <199802180637.HAA09054@localhost.tu-graz.ac.at>
Date: Wed, 18 Feb 1998 07:37:46 +0100 (CET)
From: Martin Kammerhofer <dada@sbox.tu-graz.ac.at>
Reply-To: dada@sbox.tu-graz.ac.at
To: FreeBSD-gnats-submit@freebsd.org
Subject: missing newline in output of id -p
X-Send-Pr-Version: 3.2

>Number:         5778
>Category:       bin
>Synopsis:       missing newline in output of id -p
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    steve
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 17 23:00:04 PST 1998
>Closed-Date:    Wed Feb 18 09:36:56 PST 1998
>Last-Modified:  Wed Feb 18 09:40:08 PST 1998
>Originator:     Martin Kammerhofer
>Release:        FreeBSD 2.2.5-STABLE i386
>Organization:
Graz University of Technology
>Environment:

	nothing special

>Description:

	if id -p is called with euid != ruid then
	output is missing a '\n'.
	This is ugly and confusing. 	

>How-To-Repeat:

<ttyp3 />su
<ttyp3 /#cp /usr/bin/id /tmp
<ttyp3 /#chown daemon:mail /tmp/id
<ttyp3 /#chmod ug+s /tmp/id
<ttyp3 /#/tmp/id -p
login	dada
uid	root
euid	daemonrgid	wheel
groups	wheel mail wheel

>Fix:

fixing id(1) should take less time than it took me typing this PR :)
	
Index: id.c
===================================================================
RCS file: /home/dada/cvsroot/src/id.c,v
retrieving revision 1.1.1.1
diff -u -K -r1.1.1.1 id.c
--- id.c	1998/02/18 06:17:44	1.1.1.1
+++ id.c	1998/02/18 06:21:03
@@ -174,9 +174,9 @@
 
 		if ((eid = geteuid()) != rid)
 			if ((pw = getpwuid(eid)))
-				(void)printf("euid\t%s", pw->pw_name);
+				(void)printf("euid\t%s\n", pw->pw_name);
 			else
-				(void)printf("euid\t%u", eid);
+				(void)printf("euid\t%u\n", eid);
 		if ((rid = getgid()) != (eid = getegid()))
 			if ((gr = getgrgid(rid)))
 				(void)printf("rgid\t%s\n", gr->gr_name);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Wed Feb 18 09:36:56 PST 1998 
State-Changed-Why:  
Suggested patch applied.  Thanks! 
>Unformatted:
