Skip Menu |
 

Download (untitled) / with headers
text/plain 3.2KiB
From donn@u.washington.edu Tue May 20 11:03:12 1997
Received: from MIT.EDU (SOUTH-STATION-ANNEX.MIT.EDU [18.72.1.2]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id LAA01644 for <bugs@RT-11.MIT.EDU>; Tue, 20 May 1997 11:03:12 -0400
Received: from melville.u.washington.edu by MIT.EDU with SMTP
id AA00999; Tue, 20 May 97 11:03:11 EDT
Received: (from donn@localhost)
by melville.u.washington.edu (8.8.4+UW97.04/8.8.4+UW97.05)
id IAA89766; Tue, 20 May 1997 08:03:10 -0700
Message-Id: <199705201503.IAA89766@melville.u.washington.edu>
Date: Tue, 20 May 1997 08:03:10 -0700
From: donn@u.washington.edu
Reply-To: donn@u.washington.edu
To: krb5-bugs@MIT.EDU
Subject: telnetd banner (BSD 4.4!!?)
X-Send-Pr-Version: 3.99

Show quoted text
>Number: 430
>Category: krb5-appl
>Synopsis: Telnetd banner erroneously proclaims BSD 4.4
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: krb5-unassigned
>State: open
>Class: change-request
>Submitter-Id: unknown
>Arrival-Date: Tue May 20 11:04:01 EDT 1997
>Last-Modified:
>Originator: Donn Cave
>Organization:
University Computing Services
University of Washington
Show quoted text
>Release: 1.0pl1
>Environment:
Digital UNIX, Ultrix, AIX, HP/UX
System: AIX melville 2 4 000010504900


Show quoted text
>Description:
Telnetd's login banner setup kind of revolves around the notion
that it's going to come from /etc/gettytab, but the code that
would actually do that is not compiled on any platform I have.
The fallback recognizes an inadequate set of UNIX platforms and
then defaults to BSD 4.4. While it's delightful to imagine that
my AIX, Ultrix, HP/UX etc. computers could be miraculously
transformed into BSD 4.4, the disappointing reality is that the
banner lies, and we couldn't put that into production.

So we put in something based on uname(), which seems to work fine
(although as usually requires special attention on AIX.)

Show quoted text
>How-To-Repeat:
Log in on something other than Solaris.
Show quoted text
>Fix:
Context diff appended.
----------------------
*** src/appl/telnet/telnetd/telnetd.c.dist Fri Nov 8 14:25:20 1996
--- src/appl/telnet/telnetd/telnetd.c Wed Apr 16 13:11:39 1997
***************
*** 179,184 ****
--- 179,204 ----
'\0'
};

+ #include <sys/utsname.h>
+ static void
+ osbanner(char *banner)
+ {
+ struct utsname name;
+
+ if (uname(&name) < 0)
+ sprintf(banner, "\r\nError getting hostname: %s\r\n",
+ strerror(errno));
+ else {
+ #if defined(_AIX)
+ sprintf(banner, "\r\n %%h (%s release %s.%s)\r\n\r\n",
+ name.sysname, name.version, name.release);
+ #else
+ sprintf(banner, "\r\n %%h (%s release %s %s)\r\n\r\n",
+ name.sysname, name.release, name.version);
+ #endif
+ }
+ }
+
main(argc, argv)
int argc;
char *argv[];
***************
*** 1211,1218 ****
HEstr = 0;
}
edithost(HEstr, host_name);
! if (hostinfo && *IM)
! putf(IM, ptyibuf2);

if (pcc)
(void) strncat(ptyibuf2, ptyip, pcc+1);
--- 1231,1243 ----
HEstr = 0;
}
edithost(HEstr, host_name);
!
! if (hostinfo && *IM) {
! char banner[4096];
! osbanner(banner);
! putf(banner, ptyibuf2);
! /* putf(IM, ptyibuf2); */
! }

if (pcc)
(void) strncat(ptyibuf2, ptyip, pcc+1);
Show quoted text
>Audit-Trail:
>Unformatted: