summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbitblt <bitblt@openbsd.org>1996-11-03 23:16:09 +0000
committerbitblt <bitblt@openbsd.org>1996-11-03 23:16:09 +0000
commit16d0788315751537462ba1db2c8aa9cc87043ec9 (patch)
tree844dfd0468439708932dcf4861e1fbe5c8aee503
parentvis (diff)
downloadwireguard-openbsd-16d0788315751537462ba1db2c8aa9cc87043ec9.tar.xz
wireguard-openbsd-16d0788315751537462ba1db2c8aa9cc87043ec9.zip
sh can now be started in a directory whose fully qualified pathname
is between 255 and MAXPATHLEN-1 characters.
-rw-r--r--bin/sh/cd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/sh/cd.c b/bin/sh/cd.c
index 79f08c82111..b5f33336899 100644
--- a/bin/sh/cd.c
+++ b/bin/sh/cd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd.c,v 1.8 1996/10/20 00:54:44 millert Exp $ */
+/* $OpenBSD: cd.c,v 1.9 1996/11/03 23:16:09 bitblt Exp $ */
/* $NetBSD: cd.c,v 1.15 1996/03/01 01:58:58 jtc Exp $ */
/*-
@@ -41,17 +41,19 @@
#if 0
static char sccsid[] = "@(#)cd.c 8.2 (Berkeley) 5/4/95";
#else
-static char rcsid[] = "$OpenBSD: cd.c,v 1.8 1996/10/20 00:54:44 millert Exp $";
+static char rcsid[] = "$OpenBSD: cd.c,v 1.9 1996/11/03 23:16:09 bitblt Exp $";
#endif
#endif /* not lint */
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/param.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
+
/*
* The cd and pwd commands.
*/
@@ -238,7 +240,7 @@ pwdcmd(argc, argv)
-#define MAXPWD 256
+#define MAXPWD MAXPATHLEN
/*
* Find out what the current directory is. If we already know the current