From owner-freebsd-bugs Sun Sep 22 10:30:05 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA05399 for bugs-outgoing; Sun, 22 Sep 1996 10:30:05 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA05364; Sun, 22 Sep 1996 10:30:01 -0700 (PDT) Resent-Date: Sun, 22 Sep 1996 10:30:01 -0700 (PDT) Resent-Message-Id: <199609221730.KAA05364@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, pjchilds@imforei.apana.org.au Received: from al.imforei.apana.org.au (pjchilds@al.imforei.apana.org.au [202.12.89.41]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id KAA03706 for ; Sun, 22 Sep 1996 10:27:41 -0700 (PDT) Received: (from pjchilds@localhost) by al.imforei.apana.org.au (8.7.6/8.7.3) id CAA08327; Mon, 23 Sep 1996 02:57:37 +0930 (CST) Message-Id: <199609221727.CAA08327@al.imforei.apana.org.au> Date: Mon, 23 Sep 1996 02:57:37 +0930 (CST) From: Peter Childs Reply-To: pjchilds@imforei.apana.org.au To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/1664: libexec-getty bug Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >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: