Clean up changes a bit.

This commit is contained in:
mjl 2000-01-13 12:43:19 +00:00
parent b7de5e4494
commit eb1d660e28
3 changed files with 16 additions and 9 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.27 2000/01/13 06:52:47 mjl Exp $
# $NetBSD: Makefile,v 1.28 2000/01/13 12:43:19 mjl Exp $
# @(#)Makefile 8.1 (Berkeley) 7/19/93
SRCTOP= ../..
@ -11,7 +11,7 @@ LDADD+= -lutil -lcrypt
BINOWN= root
BINMODE=4555
INSTALLFLAGS=-fschg
CFLAGS+= -DLOGIN_CAP -g
CPPFLAGS+=-DLOGIN_CAP
.include <bsd.own.mk>

View File

@ -1,4 +1,4 @@
.\" $NetBSD: login.1,v 1.17 1999/07/12 21:36:11 aidan Exp $
.\" $NetBSD: login.1,v 1.18 2000/01/13 12:43:19 mjl Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@ -173,6 +173,7 @@ makes login quieter
.Xr skey 1 ,
.Xr getpass 3 ,
.Xr ttyaction 3 ,
.Xr login.conf 5 ,
.Xr utmp 5 ,
.Xr environ 7
.Sh HISTORY

View File

@ -1,4 +1,4 @@
/* $NetBSD: login.c,v 1.50 2000/01/13 06:52:47 mjl Exp $ */
/* $NetBSD: login.c,v 1.51 2000/01/13 12:43:20 mjl Exp $ */
/*-
* Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994
@ -44,7 +44,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94";
#endif
__RCSID("$NetBSD: login.c,v 1.50 2000/01/13 06:52:47 mjl Exp $");
__RCSID("$NetBSD: login.c,v 1.51 2000/01/13 12:43:20 mjl Exp $");
#endif /* not lint */
/*
@ -607,11 +607,16 @@ main(argc, argv)
(void)setenv("TERM", term, 0);
(void)setenv("LOGNAME", pwd->pw_name, 1);
(void)setenv("USER", pwd->pw_name, 1);
#ifdef LOGIN_CAP
setusercontext(lc, pwd, pwd->pw_uid, LOGIN_SETPATH);
if(lc)
setusercontext(lc, pwd, pwd->pw_uid, LOGIN_SETPATH);
else
(void)setenv("PATH", _PATH_DEFPATH, 0);
#else
(void)setenv("PATH", _PATH_DEFPATH, 0);
#endif
#ifdef KERBEROS
if (krbtkfile_env)
(void)setenv("KRBTKFILE", krbtkfile_env, 1);
@ -640,15 +645,16 @@ main(argc, argv)
#endif
if (!quietlog) {
char *fname;
char *fname;
#ifdef LOGIN_CAP
fname = login_getcapstr(lc, "copyright", NULL, NULL);
if (fname && access(fname, F_OK) == 0)
motd(fname);
else
#endif
(void)printf(copyrightstr);
#else
(void)printf(copyrightstr);
#endif
#ifdef LOGIN_CAP
fname = login_getcapstr(lc, "welcome", NULL, NULL);