Subject: Re: check resource limits with exec(3)?
To: Jeremy C. Reed <reed@reedmedia.net>
From: Greg A. Woods <woods@weird.com>
List: tech-userlevel
Date: 06/05/2006 19:26:56
--pgp-sign-Multipart_Mon_Jun__5_19:26:53_2006-1
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

At Mon, 5 Jun 2006 14:28:57 -0700 (PDT),
Jeremy C. Reed wrote:
>=20
> 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?
>=20
> Should exec(3) check if the resource limit (like maxproc) has already been
> reached?

No, it had better not do so, especially not maxproc.  Calls to the
exec() family of functions do not change the number of processes that
are running.

It is also critical that one be able to exec another program when one is
already running maxproc processes.

--=20
						Greg A. Woods

H:+1 416 218-0098 W:+1 416 489-5852 x122 VE3TCP RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>       Secrets of the Weird <woods@weird.com>

--pgp-sign-Multipart_Mon_Jun__5_19:26:53_2006-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
MessageID: hNRibkJpURNL/SIoDMQcIDu3m4lOJl0Y

iQA/AwUBRIS9wGJ7XxTCWceFEQKQhwCgxyOfQMwPaSPrNxerA4zsqugsgrEAn3bn
Ixbm5GHNxdEGg45pRKjRaDOA
=XTAQ
-----END PGP SIGNATURE-----

--pgp-sign-Multipart_Mon_Jun__5_19:26:53_2006-1--