Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/su Removed code that would squash root's path when s...
details: https://anonhg.NetBSD.org/src/rev/fb59c8bfe54f
branches: trunk
changeset: 481231:fb59c8bfe54f
user: mjl <mjl%NetBSD.org@localhost>
date: Tue Jan 25 02:19:19 2000 +0000
description:
Removed code that would squash root's path when suing to root,
restores old behaviour of su.
diffstat:
usr.bin/su/su.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diffs (32 lines):
diff -r 1675978c99a3 -r fb59c8bfe54f usr.bin/su/su.c
--- a/usr.bin/su/su.c Tue Jan 25 02:16:57 2000 +0000
+++ b/usr.bin/su/su.c Tue Jan 25 02:19:19 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: su.c,v 1.37 2000/01/14 02:39:14 mjl Exp $ */
+/* $NetBSD: su.c,v 1.38 2000/01/25 02:19:19 mjl Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@@ -44,7 +44,7 @@
#if 0
static char sccsid[] = "@(#)su.c 8.3 (Berkeley) 4/2/94";*/
#else
-__RCSID("$NetBSD: su.c,v 1.37 2000/01/14 02:39:14 mjl Exp $");
+__RCSID("$NetBSD: su.c,v 1.38 2000/01/25 02:19:19 mjl Exp $");
#endif
#endif /* not lint */
@@ -345,12 +345,7 @@
if (chdir(pwd->pw_dir) < 0)
errx(1, "no directory");
}
-#ifdef LOGIN_CAP
- else if (pwd->pw_uid == 0)
- if (setusercontext(lc,
- pwd, pwd->pw_uid, LOGIN_SETPATH|LOGIN_SETUMASK))
- err(1, "setting path");
-#endif
+
if (asthem || pwd->pw_uid)
(void)setenv("USER", pwd->pw_name, 1);
(void)setenv("HOME", pwd->pw_dir, 1);
Home |
Main Index |
Thread Index |
Old Index