[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/52194: httpd fails to exec cgi scripts outside of cgi-bin
The following reply was made to PR bin/52194; it has been noted by GNATS.
From: Martin Husemann <martin%duskware.de@localhost>
Subject: Re: bin/52194: httpd fails to exec cgi scripts outside of cgi-bin
Date: Wed, 26 Apr 2017 14:47:11 +0200
Here is a simple method to reproduce it in -current as well.
Extract below shar in a temp dir and then run the included ./dotest script.
It will leave a background httpd and /bin/sh process around.
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
# This archive contains:
echo x - demo.sh
sed 's/^X//' >demo.sh << 'END-of-demo.sh'
Xprintf "Content-Type: plain/text\n\n"
Xprintf "Command line args:\n"
echo x - dotest
sed 's/^X//' >dotest << 'END-of-dotest'
Xexec /usr/libexec/httpd -d -d -d -d -d -d -s -C .sh /bin/sh . www.test.com < req > resp
echo x - req
sed 's/^X//' >req << 'END-of-req'
XGET /demo.sh HTTP/1.1
Main Index |
Thread Index |