From owner-p4-projects Sun May 5 16: 2:57 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4214637B403; Sun, 5 May 2002 16:02:52 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8625637B406 for ; Sun, 5 May 2002 16:02:51 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g45N2pK18837 for perforce@freebsd.org; Sun, 5 May 2002 16:02:51 -0700 (PDT) (envelope-from amigus@tislabs.com) Date: Sun, 5 May 2002 16:02:51 -0700 (PDT) Message-Id: <200205052302.g45N2pK18837@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to amigus@tislabs.com using -f From: Adam Migus Subject: PERFORCE change 10858 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=10858 Change 10858 by amigus@amigus_vmganyopa on 2002/05/05 16:02:07 getty now sets a ttylabel whether "me" exists in ~/.login_conf or not. The label is root's label in /etc/login.conf. The man page says that login_getuserclass() defaults to root or default depending on who calls it. The source code says not to default if the user calls login_getuserclass(). As such this is more of a workaround than a fix. Affected files ... ... //depot/projects/trustedbsd/mac/libexec/getty/main.c#6 edit Differences ... ==== //depot/projects/trustedbsd/mac/libexec/getty/main.c#6 (text+ko) ==== @@ -237,6 +237,20 @@ login_cap_t *lc; lc = login_getuserclass(rootpw); + /* + * login_getuserclass() searches for "me" + * (LOGIN_MECLASS) in ~/.login_conf. If it fails, + * it doesn't fallback to "root" (LOGIN_ROOTDEFCLASS) + * or "default" (LOGIN_DEFCLASS). Thus it will return + * NULL if root doesn't have a "me" entry defined in + * ~/.login_conf. + * login_getpwclass() will default, so if + * login_getuserclass() fails here we call it to + * ensure that a label gets set on the tty. + * / + if(lc == NULL) + lc = login_getpwclass(rootpw); + if (lc != NULL) { char *rootmacstr; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message