[PATCH] Simplify chroot code in smbd

Andreas Schneider asn at samba.org
Fri Feb 12 07:54:23 UTC 2016


On Wednesday 10 February 2016 14:31:53 you wrote:
> On Wed, Feb 10, 2016 at 04:25:29PM +0100, Andreas Schneider wrote:
> > Review and push appreciated ...
> > 
> > Thanks,
> > 
> > 	-- andreas
> 
> Andreas - I think this:
> 
> 	chroot_dir = lp_root_directory(talloc_tos());
> 	if (chroot_dir != NULL) {
> 
> is incorrect. lp_XXX() strings don't return NULL
> if a parameter is unset, they return a pointer to '\0'.
> 
> So this should be:
> 
> 	chroot_dir = lp_root_directory(talloc_tos());
> 	if (*chroot_dir != '\0') {

Updated patch attached ...

-- 
Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at samba.org
www.samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-smbd-Simplify-chroot-option-in-smbd.patch
Type: text/x-patch
Size: 2149 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160212/ccff0874/0001-smbd-Simplify-chroot-option-in-smbd.bin>


More information about the samba-technical mailing list