NetBSD Problem Report #1848
From gnats Mon Dec 18 12:50:46 1995
Received: from Collatz.McRCIM.McGill.EDU by pain.lcs.mit.edu (8.6.12/8.6.9) with ESMTP id MAA16994 for <gnats-bugs@gnats.netbsd.org>; Mon, 18 Dec 1995 12:47:41 -0500
Message-Id: <199512181747.MAA16513@Collatz.McRCIM.McGill.EDU>
Date: Mon, 18 Dec 1995 12:47:21 -0500
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
Reply-To: mouse@Collatz.McRCIM.McGill.EDU
To: gnats-bugs@gnats.netbsd.org
Subject: [dM] identd prepends a space to usernames
X-Send-Pr-Version: 3.2
>Number: 1848
>Category: bin
>Synopsis: [dM] identd prepends a space to usernames
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Dec 18 13:05:00 +0000 1995
>Closed-Date: Mon Jan 15 21:08:40 +0000 1996
>Last-Modified: Mon Jan 15 21:09:12 +0000 1996
>Originator: der Mouse
>Release: -current sup as of last successful one (Dec 11th?)
>Organization:
Dis-
>Environment:
Any (noticed on SPARC IPC)
>Description:
/usr/libexec/identd gratuitously prepends a space to all
usernames returned. (This is a common bug, but it is still a
bug; RFC1413 makes it quite clear that in a USERID response,
everything after the third colon is part of the username.
While it does contain an example appearing to contradict this,
the text (more authoritative than the examples) it is quite
clear. Page 4, near the top, says
The identifier is an unformatted octet string - - all
octets are permissible EXCEPT octal 000 (NUL), 012 (LF)
and 015 (CR). N.B. - space characters (040) following the
colon separator ARE part of the identifier string and
may not be ignored. A response string is still
terminated normally by a CR/LF. N.B. A string may be
printable, but is not *necessarily* printable.
The "Notes on Syntax" section, item 1, reiterates this point.
>How-To-Repeat:
Do a port-113 lookup on a NetBSD box. Notice the space between
the third colon in the response and the username.
>Fix:
I have sent a similar patch (though I think it fixed only the
username case, not either of the numeric cases) to Peter
Eriksson; I believe it's made it into the current code up for
ftp from the Swedish site.
+++ NEW/libexec/identd/parse.c Thu Jan 1 00:00:00 1970
@@ -355,7 +355,7 @@
syslog(LOG_WARNING, "getpwuid() could not map uid (%d) to name",
uid);
- printf("%d , %d : USERID : OTHER%s%s : %d\r\n",
+ printf("%d , %d : USERID : OTHER%s%s :%d\r\n",
lport, fport,
charset_name ? " , " : "",
charset_name ? charset_name : "",
@@ -384,13 +384,13 @@
}
if (number_flag)
- printf("%d , %d : USERID : OTHER%s%s : %d\r\n",
+ printf("%d , %d : USERID : OTHER%s%s :%d\r\n",
lport, fport,
charset_name ? " , " : "",
charset_name ? charset_name : "",
uid);
else
- printf("%d , %d : USERID : %s%s%s : %s\r\n",
+ printf("%d , %d : USERID : %s%s%s :%s\r\n",
lport, fport,
other_flag ? "OTHER" : "UNIX",
charset_name ? " , " : "",
der Mouse
mouse@collatz.mcrcim.mcgill.edu
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed
State-Changed-By: jtc
State-Changed-When: Tue Jan 2 16:01:21 1996
State-Changed-Why:
Read RFC, confirmed broken behavior.
State-Changed-From-To: analyzed->closed
State-Changed-By: thorpej
State-Changed-When: Mon Jan 15 13:08:40 PST 1996
State-Changed-Why:
This has been fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.49 2026/05/14 01:52:41 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.