cvs commit: src/sys/kern kern_fork.c

Xin LI delphij at frontfree.net
Tue Jul 13 08:48:14 PDT 2004


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

I think it should be suser(td)?

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

-------------- next part --------------
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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20040713/174ee4c5/attachment.bin


More information about the cvs-src mailing list