diff options
| author | 1996-03-03 17:19:36 +0000 | |
|---|---|---|
| committer | 1996-03-03 17:19:36 +0000 | |
| commit | 5ac46f4a009be3bdcce4d951fbd0eed1cac71377 (patch) | |
| tree | 1ebbc69319978d4a58e8f853e4ee407742c40cbd /sys/kern/exec_script.c | |
| parent | From NetBSD: Use const qualifier with conversion, args and clist tables (diff) | |
| download | wireguard-openbsd-5ac46f4a009be3bdcce4d951fbd0eed1cac71377.tar.xz wireguard-openbsd-5ac46f4a009be3bdcce4d951fbd0eed1cac71377.zip | |
From NetBSD: 960217 merge
Diffstat (limited to 'sys/kern/exec_script.c')
| -rw-r--r-- | sys/kern/exec_script.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/exec_script.c b/sys/kern/exec_script.c index dfd1a405f00..fea8f4cf23d 100644 --- a/sys/kern/exec_script.c +++ b/sys/kern/exec_script.c @@ -1,4 +1,5 @@ -/* $NetBSD: exec_script.c,v 1.12 1995/04/10 18:27:59 mycroft Exp $ */ +/* $OpenBSD: exec_script.c,v 1.2 1996/03/03 17:19:38 niklas Exp $ */ +/* $NetBSD: exec_script.c,v 1.13 1996/02/04 02:15:06 christos Exp $ */ /* * Copyright (c) 1993, 1994 Christopher G. Demetriou @@ -105,6 +106,7 @@ exec_script_makecmds(p, epp) shellname = NULL; shellarg = NULL; + shellarglen = 0; /* strip spaces before the shell name */ for (cp = hdrstr + EXEC_SCRIPT_MAGICLEN; *cp == ' ' || *cp == '\t'; @@ -134,7 +136,6 @@ exec_script_makecmds(p, epp) * behaviour. */ shellarg = cp; - shellarglen = 0; for ( /* cp = cp */ ; *cp != '\0'; cp++) shellarglen++; *cp++ = '\0'; @@ -263,7 +264,9 @@ check_shell: /* XXX oldpnbuf not set for "goto fail" path */ epp->ep_ndp->ni_cnd.cn_pnbuf = oldpnbuf; +#ifdef FDSCRIPTS fail: +#endif /* note that we've clobbered the header */ epp->ep_flags |= EXEC_DESTR; |
