From owner-svn-src-head@FreeBSD.ORG Wed Nov 4 07:04:35 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 165DA10657C1; Wed, 4 Nov 2009 07:04:35 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077035009.chello.pl [89.77.35.9]) by mx1.freebsd.org (Postfix) with ESMTP id 4FFDF8FC15; Wed, 4 Nov 2009 07:04:33 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 2F0C545E94; Wed, 4 Nov 2009 08:04:32 +0100 (CET) Received: from localhost (chello089077035009.chello.pl [89.77.35.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id E978745C8A; Wed, 4 Nov 2009 08:04:26 +0100 (CET) Date: Wed, 4 Nov 2009 08:04:27 +0100 From: Pawel Jakub Dawidek To: Edward Tomasz Napierala Message-ID: <20091104070427.GE2073@garage.freebsd.pl> References: <200911040648.nA46mYrb021862@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ULyIDA2m8JTe+TiX" Content-Disposition: inline In-Reply-To: <200911040648.nA46mYrb021862@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198874 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2009 07:04:35 -0000 --ULyIDA2m8JTe+TiX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 04, 2009 at 06:48:34AM +0000, Edward Tomasz Napierala wrote: > Author: trasz > Date: Wed Nov 4 06:48:34 2009 > New Revision: 198874 > URL: http://svn.freebsd.org/changeset/base/198874 >=20 > Log: > Make sure we don't end up with VAPPEND without VWRITE, if someone calls= open(2) > like this: open(..., O_APPEND). >=20 > Modified: > head/sys/kern/vfs_vnops.c >=20 > Modified: head/sys/kern/vfs_vnops.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/vfs_vnops.c Wed Nov 4 06:47:14 2009 (r198873) > +++ head/sys/kern/vfs_vnops.c Wed Nov 4 06:48:34 2009 (r198874) > @@ -213,7 +213,7 @@ restart: > if (fmode & FEXEC) > accmode |=3D VEXEC; > if (fmode & O_APPEND) > - accmode |=3D VAPPEND; > + accmode |=3D VWRITE | VAPPEND; > #ifdef MAC > error =3D mac_vnode_check_open(cred, vp, accmode); > if (error) Why? If someone does O_APPEND only we don't want to give him write access... --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --ULyIDA2m8JTe+TiX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD4DBQFK8Sd6ForvXbEpPzQRAgvmAJ9Qnz7Dl78+vfqBPmTQc+wk4dG0HgCYo9rI OGyaT691cOXGNOven1BgRQ== =cNJO -----END PGP SIGNATURE----- --ULyIDA2m8JTe+TiX--