Date: Mon, 23 Sep 1996 02:57:37 +0930 (CST) From: Peter Childs <pjchilds@imforei.apana.org.au> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/1664: libexec-getty bug Message-ID: <199609221727.CAA08327@al.imforei.apana.org.au> Resent-Message-ID: <199609221730.KAA05364@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 1664 >Category: bin >Synopsis: getty doesn't use init kerninfo struct >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Sep 22 10:30:01 PDT 1996 >Last-Modified: >Originator: Peter Childs >Organization: Peter Childs --- http://www.imforei.apana.org.au/~pjchilds Finger pjchilds@al.imforei.apana.org.au for public PGP key >Release: FreeBSD 2.2-CURRENT i386 >Environment: 2.2-current system >Description: "man gettytab" shows the following.. %m, %r, %s, %v The type of machine, release of the operating system, name of the operating system, and version of the kernel, respectively, as re- turned by uname(2). and although most of the code is in /usr/src/libexec/getty it doesn't seem to fill in the "kerninfo" structure (see man 3 uname), hence it doesn't work :( >How-To-Repeat: Try to get system info in getty's logins.. and dont - ie try this in /etc/gettytab default:\ :cb:ce:ck:lc:fd#1000:im=\033[1;1H\033[2J\014\r\n\ Hello, this is %h (%t)\r\n\r\n\ %s %r %m\r\n\r\n\ :sp#1200: >Fix: Apply this patch... *** main.c.orig Mon Sep 23 02:32:49 1996 --- main.c Mon Sep 23 02:55:22 1996 *************** *** 180,185 **** --- 180,186 ---- gethostname(hostname, sizeof(hostname)); if (hostname[0] == '\0') strcpy(hostname, "Amnesiac"); + uname(&kerninfo); /* * Limit running time to deal with broken or dead lines. >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609221727.CAA08327>