Subject: check resource limits with exec(3)?
To: None <tech-userlevel@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-userlevel
Date: 06/05/2006 14:28:57
What is the procedure for checking resource limits when the process is 
started as root with a fork and then uses setuid to change user?

Should exec(3) check if the resource limit (like maxproc) has already been 
reached? Or maybe a new exec(3) functions just for this?

Or what is the best way to handle this?

I see that sys/kern/kern_fork.c has checks for this, but kern_exec.c does 
not care.

 Jeremy C. Reed