Fix empty ACLs with nfs4 vfs module

David Disseldorp ddiss at suse.de
Wed Oct 30 10:16:40 MDT 2013


On Wed, 30 Oct 2013 16:04:35 +0100
Alexander Werth <werth at linux.vnet.ibm.com> wrote:

> Good point. I overlooked this check in make_sec_acl().
> That actually simplifies the patch even further since a null return
> value is not an error if there are zero ace's.
> 
> -	nt_ace_list = (struct security_ace *)TALLOC_REALLOC(mem_ctx,
> -					nt_ace_list,
> -					good_aces * sizeof(struct security_ace));
> -	if (nt_ace_list == NULL) {
> +	nt_ace_list = (struct security_ace *)
> +		TALLOC_REALLOC(mem_ctx, nt_ace_list,
> +			       good_aces * sizeof(struct security_ace));
> +	if (good_aces && nt_ace_list == NULL) {

I would've preferred something explicit over relying on
TALLOC_REALLOC's null return on size=0, but looks good enough as is.

Please add your Signed-off-by to both patches and I'll push them to
autobuild.

Cheers, David


More information about the samba-technical mailing list