summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_misc.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1997-04-28 02:53:17 +0000
committermsmith <msmith@FreeBSD.org>1997-04-28 02:53:17 +0000
commit902e53fc9424daa95869606bb00549534a6eea8d (patch)
tree20506fefa7397abcc8bc6356670118ae3ce2ba5f /sys/compat/linux/linux_misc.c
parent222b28542afdee88c1971ce4e5f51a241da5827c (diff)
downloadFreeBSD-src-902e53fc9424daa95869606bb00549534a6eea8d.zip
FreeBSD-src-902e53fc9424daa95869606bb00549534a6eea8d.tar.gz
Always include PROT_READ for Linux mmap operations.
Submitted by: Hannu Savolainen <hannu@voxware.pp.fi> via jkh
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r--sys/compat/linux/linux_misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 9f88a75..fc8bae9 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: linux_misc.c,v 1.26 1997/03/24 11:24:30 bde Exp $
+ * $Id: linux_misc.c,v 1.27 1997/04/01 08:39:06 bde Exp $
*/
#include <sys/param.h>
@@ -611,7 +611,7 @@ linux_mmap(struct proc *p, struct linux_mmap_args *args, int *retval)
bsd_args.flags |= MAP_ANON;
bsd_args.addr = linux_args.addr;
bsd_args.len = linux_args.len;
- bsd_args.prot = linux_args.prot;
+ bsd_args.prot = linux_args.prot | PROT_READ; /* always required */
bsd_args.fd = linux_args.fd;
bsd_args.pos = linux_args.pos;
bsd_args.pad = 0;
OpenPOWER on IntegriCloud