summaryrefslogtreecommitdiff
path: root/libexec/rlogind
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-02-22 10:39:32 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-02-22 10:39:32 +0000
commit4c854868cc9d88b40b51805184ab69d76d36dad6 (patch)
tree7934a1829f90cda4b75c04aecd6fde694c0a7d22 /libexec/rlogind
parentbd978a3cd2531b8b9199c83ee514bfc7a1b95854 (diff)
From NetBSD:
Make sure that the user name cannot ever be interpreted as an option to login(8). Note: This does *not* fix any security holes.
Diffstat (limited to 'libexec/rlogind')
-rw-r--r--libexec/rlogind/rlogind.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c
index c4dd9550626..0421c07b466 100644
--- a/libexec/rlogind/rlogind.c
+++ b/libexec/rlogind/rlogind.c
@@ -39,7 +39,7 @@ static char copyright[] =
#ifndef lint
/* from: static char sccsid[] = "@(#)rlogind.c 8.1 (Berkeley) 6/4/93"; */
-static char *rcsid = "$Id: rlogind.c,v 1.2 1995/12/16 22:20:20 tholo Exp $";
+static char *rcsid = "$Id: rlogind.c,v 1.3 1996/02/22 10:39:24 niklas Exp $";
#endif /* not lint */
/*
@@ -299,11 +299,11 @@ doit(f, fromp)
hostname);
#endif
- execl(_PATH_LOGIN, "login", "-p",
- "-h", hostname, "-f", lusername, (char *)NULL);
+ execl(_PATH_LOGIN, "login", "-p", "-h", hostname, "-f",
+ "--", lusername, (char *)NULL);
} else
- execl(_PATH_LOGIN, "login", "-p",
- "-h", hostname, lusername, (char *)NULL);
+ execl(_PATH_LOGIN, "login", "-p", "-h", hostname,
+ "--", lusername, (char *)NULL);
fatal(STDERR_FILENO, _PATH_LOGIN, 1);
/*NOTREACHED*/
}