summaryrefslogtreecommitdiffstats
path: root/sys/kern/imgact_shell.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1997-04-23 22:07:05 +0000
committerache <ache@FreeBSD.org>1997-04-23 22:07:05 +0000
commit2f86c7eb1586742428169502d63e646612344f7b (patch)
tree424aa0640ed70445b9b61c5bd200b1891743c84c /sys/kern/imgact_shell.c
parent4edae968dd14744515571f59dceb4ce3c9a81d40 (diff)
downloadFreeBSD-src-2f86c7eb1586742428169502d63e646612344f7b.zip
FreeBSD-src-2f86c7eb1586742428169502d63e646612344f7b.tar.gz
Don't clobber user space argv0 memory on shell exec, mainly for vfork()
Fix another bug: if argv[0] is NULL, garbadge args might be added for shell script Submitted by: Tor Egge <Tor.Egge@idi.ntnu.no> (with yet one fault detect from me)
Diffstat (limited to 'sys/kern/imgact_shell.c')
-rw-r--r--sys/kern/imgact_shell.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/imgact_shell.c b/sys/kern/imgact_shell.c
index fb03011..526aac7 100644
--- a/sys/kern/imgact_shell.c
+++ b/sys/kern/imgact_shell.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: imgact_shell.c,v 1.14 1997/02/22 09:38:57 peter Exp $
*/
#include <sys/param.h>
@@ -126,8 +126,7 @@ exec_shell_imgact(imgp)
}
}
- /* set argv[0] to point to original file name */
- suword(imgp->uap->argv, (int)imgp->uap->fname);
+ imgp->argv0 = imgp->uap->fname;
return(0);
}
OpenPOWER on IntegriCloud