[PATCH] improved chroot handling

Tony Finch dot at dotat.at
Thu Jun 27 09:23:14 EST 2002


On Wed, Jun 26, 2002 at 06:17:47PM -0500, Luc I. Suryo wrote:
> 
> it is maybe me but the code:
> 
> 	char emptydir[] = "/var/tmp/sshd.XXXXXXXXXX";
> 
> is hard coded...and we want to use what is defined by
> 
> 	_PATH_PRIVSEP_CHROOT_DIR 
> 
> yes? 

Why? The point is to make _PATH_PRIVSEP_CHROOT_DIR unnecessary.

> and should not one make sure that there is no overflow in
> emptydir??? malloc/free/strlen and that kinda of stuff 

I suggest you have a look at the manual page for mkdtemp().

Tony.
-- 
f.a.n.finch <dot at dotat.at> http://dotat.at/
NORTH UTSIRE SOUTH UTSIRE: WESTERLY VEERING NORTHWESTERLY 4 OR 5, OCCASIONALLY
6 LATER. SHOWERS. GOOD.



More information about the openssh-unix-dev mailing list