From owner-freebsd-hackers Fri Oct 24 18:25:12 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id SAA03304 for hackers-outgoing; Fri, 24 Oct 1997 18:25:12 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from smtp03.primenet.com (smtp03.primenet.com [206.165.5.84]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id SAA03299 for ; Fri, 24 Oct 1997 18:25:07 -0700 (PDT) (envelope-from tlambert@usr08.primenet.com) Received: (from daemon@localhost) by smtp03.primenet.com (8.8.7/8.8.7) id SAA07520; Fri, 24 Oct 1997 18:25:02 -0700 (MST) Received: from usr08.primenet.com(206.165.6.208) via SMTP by smtp03.primenet.com, id smtpd007514; Fri Oct 24 18:24:57 1997 Received: (from tlambert@localhost) by usr08.primenet.com (8.8.5/8.8.5) id SAA10641; Fri, 24 Oct 1997 18:24:47 -0700 (MST) From: Terry Lambert Message-Id: <199710250124.SAA10641@usr08.primenet.com> Subject: Re: Possible SERIOUS bug in open()? (Big time bug) To: Don.Lewis@tsc.tdk.com (Don Lewis) Date: Sat, 25 Oct 1997 01:24:47 +0000 (GMT) Cc: tlambert@primenet.com, jamil@trojanhorse.ml.org, thorpej@nas.nasa.gov, joerg_wunsch@uriah.heep.sax.de, freebsd-hackers@FreeBSD.ORG In-Reply-To: <199710242045.NAA18723@salsa.gv.tsc.tdk.com> from "Don Lewis" at Oct 24, 97 01:45:02 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Opening files has side effects, too. For instance, space isn't > recovered if a file is unlinked if the file is open. There is > also the issue of O_EXLOCK and O_SHLOCK. I don't want another > user to have the ability to do either with my mode 0600 files. Clearly, normal files would enforce read or write permision for open. But say you have a processor emulator that gets invoked by an execution class loader so that it can mmap a foreign binary in its address space, and then run it. ,------------------. ,------------------. | DEC Alpha binary | | DEC Alpha binary | | regular process | | emulator process | | | | ,--------------. | | | | | x86 image | | | | | | (Netscape) | | | | | `--------------' | `------------------' `------------------' You need to be able to open something with just "x" access to map it so that a proces you own can "run" it. So you also want to allow an open if you have execute access. Does having only execute access keep you from reading a file? No. You can make it core. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.