From owner-cvs-src@FreeBSD.ORG Tue Jul 13 15:48:14 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F3DC16A4CE for ; Tue, 13 Jul 2004 15:48:14 +0000 (GMT) Received: from mail.FreeBSD.org.cn (dns3.freebsd.org.cn [61.129.66.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7A5643D2F for ; Tue, 13 Jul 2004 15:48:09 +0000 (GMT) (envelope-from delphij@frontfree.net) Received: (qmail 35392 invoked by uid 0); 13 Jul 2004 15:46:16 -0000 Received: from unknown (HELO beastie.frontfree.net) (218.107.145.7) by mail.FreeBSD.org.cn with AES256-SHA encrypted SMTP; 13 Jul 2004 15:46:16 -0000 Received: from localhost (localhost.frontfree.net [127.0.0.1]) by beastie.frontfree.net (Postfix) with ESMTP id 97BBE11928; Tue, 13 Jul 2004 23:47:51 +0800 (CST) Received: from beastie.frontfree.net ([127.0.0.1]) by localhost (beastie.frontfree.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01849-03; Tue, 13 Jul 2004 23:47:50 +0800 (CST) Received: by beastie.frontfree.net (Postfix, from userid 1001) id 19F6C1143F; Tue, 13 Jul 2004 23:47:50 +0800 (CST) Date: Tue, 13 Jul 2004 23:47:50 +0800 From: Xin LI To: Colin Percival Message-ID: <20040713154750.GA1231@frontfree.net> References: <200407131310.i6DDA78k062374@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yNb1oOkm5a9FJOVX" Content-Disposition: inline In-Reply-To: <200407131310.i6DDA78k062374@repoman.freebsd.org> User-Agent: Mutt/1.4.2.1i X-GPG-key-ID/Fingerprint: 0xCAEEB8C0 / 43B8 B703 B8DD 0231 B333 DC28 39FB 93A0 CAEE B8C0 X-GPG-Public-Key: http://www.delphij.net/delphij.asc X-Operating-System: FreeBSD beastie.frontfree.net 5.2-delphij FreeBSD 5.2-delphij #80: Thu Jun 24 17:30:33 CST 2004 delphij@beastie.frontfree.net:/usr/obj/usr/src/sys/BEASTIE i386 X-URL: http://www.delphij.net X-By: delphij@beastie.frontfree.net X-Location: Beijing, China X-Virus-Scanned: by amavisd-new at frontfree.net cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_fork.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2004 15:48:14 -0000 --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 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--