Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/usr.bin/su Pull up revision 1.65 (requested by kleink in ...
details: https://anonhg.NetBSD.org/src/rev/331df2717272
branches: netbsd-3
changeset: 576535:331df2717272
user: tron <tron%NetBSD.org@localhost>
date: Sat Jul 09 23:03:11 2005 +0000
description:
Pull up revision 1.65 (requested by kleink in ticket #551):
Set LOGNAME in the new environment (in addition to USER);
fixes PR bin/30670 from Pavel Cahyna.
diffstat:
usr.bin/su/su.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r bf860c1fd6c2 -r 331df2717272 usr.bin/su/su.c
--- a/usr.bin/su/su.c Sat Jul 09 23:03:05 2005 +0000
+++ b/usr.bin/su/su.c Sat Jul 09 23:03:11 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: su.c,v 1.64 2005/01/10 03:11:50 christos Exp $ */
+/* $NetBSD: su.c,v 1.64.2.1 2005/07/09 23:03:11 tron Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)su.c 8.3 (Berkeley) 4/2/94";*/
#else
-__RCSID("$NetBSD: su.c,v 1.64 2005/01/10 03:11:50 christos Exp $");
+__RCSID("$NetBSD: su.c,v 1.64.2.1 2005/07/09 23:03:11 tron Exp $");
#endif
#endif /* not lint */
@@ -344,8 +344,10 @@
errx(1, "no directory");
}
- if (asthem || pwd->pw_uid)
+ if (asthem || pwd->pw_uid) {
+ (void)setenv("LOGNAME", pwd->pw_name, 1);
(void)setenv("USER", pwd->pw_name, 1);
+ }
(void)setenv("HOME", pwd->pw_dir, 1);
(void)setenv("SHELL", shell, 1);
}
Home |
Main Index |
Thread Index |
Old Index