[632] in Kerberos-V5-bugs
krb5 B4.2 patch for telnet on NetBSD 1.0B
daemon@ATHENA.MIT.EDU (John Brezak)
Fri Aug 12 23:30:36 1994
To: krb5-bugs@MIT.EDU
Reply-To: brezak@ch.hp.com
Date: Fri, 12 Aug 1994 23:30:15 -0400
From: John Brezak <brezak@ch.hp.com>
This patch adds some needed putf()'s for the NetBSD getty string.
Of course there needs to be an associated change to configure.in
to autoconf HAS_UNAME .
*** appl/telnet/telnetd/utility.c.orig Fri Aug 12 23:03:12 1994
--- appl/telnet/telnetd/utility.c Fri Aug 12 23:06:36 1994
***************
*** 35,40 ****
--- 35,43 ----
static char sccsid[] = "@(#)utility.c 8.1 (Berkeley) 6/4/93";
#endif /* not lint */
+ #ifdef HAS_UNAME
+ #include <sys/utsname.h>
+ #endif
#define PRINTOPTIONS
#include "telnetd.h"
***************
*** 448,454 ****
--- 451,463 ----
char *slash;
time_t t;
char db[100];
+ #ifdef HAS_UNAME
+ struct utsname utsinfo;
+ #endif
+ #ifdef HAS_UNAME
+ uname(&utsinfo);
+ #endif
putlocation = where;
while (*cp) {
***************
*** 484,489 ****
--- 493,515 ----
case '%':
putchr('%');
break;
+ #ifdef HAS_UNAME
+ case 's':
+ putstr(utsinfo.sysname);
+ break;
+
+ case 'm':
+ putstr(utsinfo.machine);
+ break;
+
+ case 'r':
+ putstr(utsinfo.release);
+ break;
+
+ case 'v':
+ puts(utsinfo.version);
+ break;
+ #endif
}
cp++;
}
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
John Brezak UUCP: uunet!apollo.hp!brezak
Hewlett Packard/Apollo Internet: brezak@ch.hp.com
300 Apollo Drive Phone: (508) 436-4915
Chelmsford, Massachusetts Fax: (508) 436-5103