summaryrefslogtreecommitdiff
path: root/bin/sh/main.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-14 01:22:31 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-14 01:22:31 +0000
commit02601ee91226d216502307a86d992be9c5e63ed4 (patch)
tree3806082c5ba14a0d6e3b0e0b0dce967baf34a87f /bin/sh/main.c
parentbe5133be93f99257ff553dce82b4027ab1b0c036 (diff)
update from netbsd, including:
Fix PR/1760, where 'cd -' before any other command could cause a reference to an uninitialized pointer. Use getcwd() to get the current working directory, instead of forking /bin/pwd [per Scott's suggestion]
Diffstat (limited to 'bin/sh/main.c')
-rw-r--r--bin/sh/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/sh/main.c b/bin/sh/main.c
index f11a9a60897..5c75cff3196 100644
--- a/bin/sh/main.c
+++ b/bin/sh/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.22 1995/09/11 17:05:44 christos Exp $ */
+/* $NetBSD: main.c,v 1.23 1995/11/19 23:27:42 christos Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -46,7 +46,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.7 (Berkeley) 7/19/95";
#else
-static char rcsid[] = "$NetBSD: main.c,v 1.22 1995/09/11 17:05:44 christos Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.23 1995/11/19 23:27:42 christos Exp $";
#endif
#endif /* not lint */
@@ -76,6 +76,7 @@ static char rcsid[] = "$NetBSD: main.c,v 1.22 1995/09/11 17:05:44 christos Exp $
#include "init.h"
#include "mystring.h"
#include "exec.h"
+#include "cd.h"
#define PROFILE 0
@@ -91,7 +92,6 @@ extern int etext();
STATIC void read_profile __P((char *));
STATIC char *find_dot_file __P((char *));
-STATIC void getpwd __P((void));
/*
* Main routine. We initialize things, parse the arguments, execute