Date: Sun, 24 Aug 2003 10:43:01 +0200 From: Pawel Jakub Dawidek <nick@garage.freebsd.pl> To: "Tim J. Robbins" <tjr@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_xxx.c Message-ID: <20030824084301.GV47959@garage.freebsd.pl> In-Reply-To: <200308231545.h7NFjwMq030694@repoman.freebsd.org> References: <200308231545.h7NFjwMq030694@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--50RDeE14MEV4qpyy Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 23, 2003 at 08:45:58AM -0700, Tim J. Robbins wrote: +> Commiter: "Tim J. Robbins" <tjr@FreeBSD.org> +> Branch: HEAD +>=20 +> Files: +> 1.38 src/sys/kern/kern_xxx.c =20 +>=20 +> Log: +> Fix a logic error in osethostid() that was introduced in rev. 1.34: +> allow hostid to be set when suser() returns 0, not when it returns +> an error. This would have allowed non-root users to set the host ID. Simlar bug is here: --- /sys/dev/sab/sab.c.orig Sun Aug 24 10:06:23 2003 +++ /sys/dev/sab/sab.c Sun Aug 24 10:06:31 2003 @@ -645,7 +645,7 @@ =20 if ((tp->t_state & TS_ISOPEN) !=3D 0 && (tp->t_state & TS_XCLUDE) !=3D 0 && - !suser(td)) + suser(td) !=3D 0) return (EBUSY); =20 if ((tp->t_state & TS_ISOPEN) =3D=3D 0) { And here: --- /sys/dev/zs/zs.c.orig Sun Aug 24 10:11:06 2003 +++ /sys/dev/zs/zs.c Sun Aug 24 10:11:21 2003 @@ -463,7 +463,7 @@ =20 if ((tp->t_state & TS_ISOPEN) !=3D 0 && (tp->t_state & TS_XCLUDE) !=3D 0 && - !suser(td)) + suser(td) !=3D 0) return (EBUSY); =20 if ((tp->t_state & TS_ISOPEN) =3D=3D 0) { --=20 Pawel Jakub Dawidek pawel@dawidek.net UNIX Systems Programmer/Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am! http://cerber.sourceforge.net --50RDeE14MEV4qpyy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBP0h6lT/PhmMH/Mf1AQG8WwP8DFn7Z9hnNTZwxeEN3pNvM38G3rLAAQSB P4mZiDcdwgUhxl5BBJpvEm8TTq9AcpJ1jhXUe1mbJYzdNQeKoAoJKInKrSbx+D9d Ilmsxx5jyhaIjBeqrESlQA7sYkZ85a6qs3ahf4YayKe4V3nPqJlmRd/CFlvMTcT5 BxnvT48v4N8= =bs3x -----END PGP SIGNATURE----- --50RDeE14MEV4qpyy--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030824084301.GV47959>