Date: Thu, 23 Oct 1997 00:17:17 +0200 From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-hackers@FreeBSD.ORG (FreeBSD hackers) Subject: Re: Possible SERIOUS bug in open()? Message-ID: <19971023001717.AU43421@uriah.heep.sax.de> In-Reply-To: <Pine.BSF.3.96.971022142133.15884B-100000@phoenix.its.rpi.edu>; from David E. Cross on Oct 22, 1997 14:22:11 -0400 References: <19971022190225.DV50844@uriah.heep.sax.de> <Pine.BSF.3.96.971022142133.15884B-100000@phoenix.its.rpi.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
As David E. Cross wrote: > I thought that O_RDRW = O_RDONLY | O_WRONLY. You better look at the actual values of these macros. ;-) Inside the kernel, it's indeed this way (FREAD and FWRITE). However in open(), O_RDONLY is 0, O_WRONLY is 1. Thus, your idea would just yield O_WRONLY. The worse case was an attempt to use O_WRONLY|O_RDWR. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971023001717.AU43421>