Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jul 2004 23:47:50 +0800
From:      Xin LI <delphij@frontfree.net>
To:        Colin Percival <cperciva@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_fork.c
Message-ID:  <20040713154750.GA1231@frontfree.net>
In-Reply-To: <200407131310.i6DDA78k062374@repoman.freebsd.org>
References:  <200407131310.i6DDA78k062374@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--yNb1oOkm5a9FJOVX
Content-Type: multipart/mixed; boundary="8t9RHnE3ZwKMSgU+"
Content-Disposition: inline


--8t9RHnE3ZwKMSgU+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jul 13, 2004 at 01:10:07PM +0000, Colin Percival wrote:
> cperciva    2004-07-13 13:10:07 UTC
>=20
>   FreeBSD src repository
>=20
>   Modified files:
>     sys/kern             kern_fork.c=20
>   Log:
>   Replace "uid !=3D 0" with "suser(td->td_ucred) !=3D 0" when checking if=
 we've
>   hit the maximum number of processes.  The last ten processes are reserv=
ed
>   for the *non-jailed* superuser.

I think it should be suser(td)?

Cheers,
--=20
Xin LI <delphij frontfree net>	http://www.delphij.net/
See complete headers for GPG key and other information.


--8t9RHnE3ZwKMSgU+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="patch-kern_fork.c"

Index: kern_fork.c
===================================================================
RCS file: /home/fcvs/src/sys/kern/kern_fork.c,v
retrieving revision 1.228
diff -u -r1.228 kern_fork.c
--- kern_fork.c	13 Jul 2004 13:10:07 -0000	1.228
+++ kern_fork.c	13 Jul 2004 15:46:38 -0000
@@ -300,7 +300,7 @@
 	 */
 	sx_xlock(&allproc_lock);
 	uid = td->td_ucred->cr_ruid;
-	if ((nprocs >= maxproc - 10 && suser(td->td_ucred) != 0) ||
+	if ((nprocs >= maxproc - 10 && suser(td) != 0) ||
 	    nprocs >= maxproc) {
 		error = EAGAIN;
 		goto fail;

--8t9RHnE3ZwKMSgU+--

--yNb1oOkm5a9FJOVX
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFA9AQlOfuToMruuMARAmuUAJ9jS+08TXzkCaZZ6HxYVt34x+zU9QCePZYR
K0TKMul66HcIgoz1Ag3Pov8=
=83Po
-----END PGP SIGNATURE-----

--yNb1oOkm5a9FJOVX--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040713154750.GA1231>