aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Traina <pst@FreeBSD.org>1996-04-24 20:18:25 +0000
committerPaul Traina <pst@FreeBSD.org>1996-04-24 20:18:25 +0000
commitc64765e4cc68b4752b031c5e226c304a1f919df6 (patch)
treec127e9a35786a121fe4ecbb33bf4b18fde15c3c0
parent3fb9e5a20bcb63a44951288212aae9042e75d7f8 (diff)
Notes
-rw-r--r--usr.sbin/sliplogin/sliplogin.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/usr.sbin/sliplogin/sliplogin.c b/usr.sbin/sliplogin/sliplogin.c
index 220ffa82bdc05..26b75cf4bf0f4 100644
--- a/usr.sbin/sliplogin/sliplogin.c
+++ b/usr.sbin/sliplogin/sliplogin.c
@@ -88,6 +88,13 @@ static char sccsid[] = "@(#)sliplogin.c 8.2 (Berkeley) 2/1/94";
#include <signal.h>
#include "pathnames.h"
+extern char **environ;
+
+static char *restricted_environ[] = {
+ "PATH=" _PATH_STDPATH,
+ NULL
+};
+
int unit;
int slip_mode;
speed_t speed;
@@ -124,6 +131,8 @@ findid(name)
char buf[128];
int i, j, n;
+ environ = restricted_environ; /* minimal protection for system() */
+
(void)strcpy(loginname, name);
if ((fp = fopen(_PATH_ACCESS, "r")) == NULL) {
accfile_err: