Index: kern_descrip.c =================================================================== RCS file: /usr/repo/src/sys/kern/kern_descrip.c,v retrieving revision 1.294 diff -u -p -r1.294 kern_descrip.c --- kern_descrip.c 1 Apr 2006 11:09:54 -0000 1.294 +++ kern_descrip.c 25 Jun 2006 17:21:48 -0000 @@ -1341,8 +1341,10 @@ falloc(struct thread *td, struct file ** fp = uma_zalloc(file_zone, M_WAITOK | M_ZERO); sx_xlock(&filelist_lock); - if ((openfiles >= maxuserfiles && (td->td_ucred->cr_ruid != 0 || - jailed(td->td_ucred))) || openfiles >= maxfiles) { + + if ((openfiles >= maxuserfiles && + suser_cred(td->td_ucred, SUSER_RUID) != 0) || + openfiles >= maxfiles) { if (ppsratecheck(&lastfail, &curfail, 1)) { printf("kern.maxfiles limit exceeded by uid %i, please see tuning(7).\n", td->td_ucred->cr_ruid);