Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2-0]: src/usr.bin/su Pull up revision 1.65 (requested by kleink i...
details: https://anonhg.NetBSD.org/src/rev/bc6c659673c2
branches: netbsd-2-0
changeset: 564809:bc6c659673c2
user: riz <riz%NetBSD.org@localhost>
date: Mon Jul 18 03:45:40 2005 +0000
description:
Pull up revision 1.65 (requested by kleink in ticket #2070):
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 858ace961f89 -r bc6c659673c2 usr.bin/su/su.c
--- a/usr.bin/su/su.c Thu Jul 07 14:20:55 2005 +0000
+++ b/usr.bin/su/su.c Mon Jul 18 03:45:40 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: su.c,v 1.58 2004/01/05 23:23:37 jmmv Exp $ */
+/* $NetBSD: su.c,v 1.58.2.1 2005/07/18 03:45:40 riz 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.58 2004/01/05 23:23:37 jmmv Exp $");
+__RCSID("$NetBSD: su.c,v 1.58.2.1 2005/07/18 03:45:40 riz Exp $");
#endif
#endif /* not lint */
@@ -346,8 +346,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