projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
set LOGNAME for POSIX.2
[unix-history]
/
usr
/
src
/
usr.bin
/
login
/
login.c
diff --git
a/usr/src/usr.bin/login/login.c
b/usr/src/usr.bin/login/login.c
index
75df5cf
..
a8cd09c
100644
(file)
--- a/
usr/src/usr.bin/login/login.c
+++ b/
usr/src/usr.bin/login/login.c
@@
-12,7
+12,7
@@
char copyright[] =
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)login.c 5.7
1
(Berkeley) %G%";
+static char sccsid[] = "@(#)login.c 5.7
2
(Berkeley) %G%";
#endif /* not lint */
/*
#endif /* not lint */
/*
@@
-391,6
+391,7
@@
main(argc, argv)
if (term[0] == '\0')
strncpy(term, stypeof(tty), sizeof(term));
(void)setenv("TERM", term, 0);
if (term[0] == '\0')
strncpy(term, stypeof(tty), sizeof(term));
(void)setenv("TERM", term, 0);
+ (void)setenv("LOGNAME", pwd->pw_name, 1);
(void)setenv("USER", pwd->pw_name, 1);
(void)setenv("PATH", _PATH_DEFPATH, 0);
#ifdef KERBEROS
(void)setenv("USER", pwd->pw_name, 1);
(void)setenv("PATH", _PATH_DEFPATH, 0);
#ifdef KERBEROS