Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/login Clean up changes a bit.
details: https://anonhg.NetBSD.org/src/rev/08eebae30747
branches: trunk
changeset: 480466:08eebae30747
user: mjl <mjl%NetBSD.org@localhost>
date: Thu Jan 13 12:43:19 2000 +0000
description:
Clean up changes a bit.
diffstat:
usr.bin/login/Makefile | 4 ++--
usr.bin/login/login.1 | 3 ++-
usr.bin/login/login.c | 18 ++++++++++++------
3 files changed, 16 insertions(+), 9 deletions(-)
diffs (91 lines):
diff -r ad37992aac32 -r 08eebae30747 usr.bin/login/Makefile
--- a/usr.bin/login/Makefile Thu Jan 13 12:39:04 2000 +0000
+++ b/usr.bin/login/Makefile Thu Jan 13 12:43:19 2000 +0000
@@ -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 @@
BINOWN= root
BINMODE=4555
INSTALLFLAGS=-fschg
-CFLAGS+= -DLOGIN_CAP -g
+CPPFLAGS+=-DLOGIN_CAP
.include <bsd.own.mk>
diff -r ad37992aac32 -r 08eebae30747 usr.bin/login/login.1
--- a/usr.bin/login/login.1 Thu Jan 13 12:39:04 2000 +0000
+++ b/usr.bin/login/login.1 Thu Jan 13 12:43:19 2000 +0000
@@ -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 @@
.Xr skey 1 ,
.Xr getpass 3 ,
.Xr ttyaction 3 ,
+.Xr login.conf 5 ,
.Xr utmp 5 ,
.Xr environ 7
.Sh HISTORY
diff -r ad37992aac32 -r 08eebae30747 usr.bin/login/login.c
--- a/usr.bin/login/login.c Thu Jan 13 12:39:04 2000 +0000
+++ b/usr.bin/login/login.c Thu Jan 13 12:43:19 2000 +0000
@@ -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 @@
#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 @@
(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 @@
#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
+ (void)printf(copyrightstr);
+#else
+ (void)printf(copyrightstr);
#endif
- (void)printf(copyrightstr);
#ifdef LOGIN_CAP
fname = login_getcapstr(lc, "welcome", NULL, NULL);
Home |
Main Index |
Thread Index |
Old Index