Date: Wed, 4 Nov 2009 08:04:27 +0100 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Edward Tomasz Napierala <trasz@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r198874 - head/sys/kern Message-ID: <20091104070427.GE2073@garage.freebsd.pl> In-Reply-To: <200911040648.nA46mYrb021862@svn.freebsd.org> References: <200911040648.nA46mYrb021862@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091104070427.GE2073>