Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/rsh Drop setuid before execing rlogin. Failure to do...
details: https://anonhg.NetBSD.org/src/rev/7f8d217a899a
branches: trunk
changeset: 803495:7f8d217a899a
user: dholland <dholland%NetBSD.org@localhost>
date: Thu Oct 30 06:13:50 2014 +0000
description:
Drop setuid before execing rlogin. Failure to do so should be
harmless, but is sloppy.
diffstat:
usr.bin/rsh/rsh.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 49500adcf1ce -r 7f8d217a899a usr.bin/rsh/rsh.c
--- a/usr.bin/rsh/rsh.c Thu Oct 30 01:36:13 2014 +0000
+++ b/usr.bin/rsh/rsh.c Thu Oct 30 06:13:50 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rsh.c,v 1.36 2014/06/08 02:44:15 enami Exp $ */
+/* $NetBSD: rsh.c,v 1.37 2014/10/30 06:13:50 dholland Exp $ */
/*-
* Copyright (c) 1983, 1990, 1993, 1994
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)rsh.c 8.4 (Berkeley) 4/29/95";
#else
-__RCSID("$NetBSD: rsh.c,v 1.36 2014/06/08 02:44:15 enami Exp $");
+__RCSID("$NetBSD: rsh.c,v 1.37 2014/10/30 06:13:50 dholland Exp $");
#endif
#endif /* not lint */
@@ -203,6 +203,7 @@
#else
if (asrsh)
*argv = __UNCONST("rlogin");
+ setuid(uid);
execv(_PATH_RLOGIN, argv);
err(1, "can't exec %s", _PATH_RLOGIN);
#endif
Home |
Main Index |
Thread Index |
Old Index