[PATCH] Fix the talloc tree for returned SD (was Re: [PATCH][WIP] Make vfs_acl_xattr use hash of the posix ACL)

Andrew Bartlett abartlet at samba.org
Wed Oct 31 16:56:00 MDT 2012


On Wed, 2012-10-31 at 22:56 +0100, Christian Ambach wrote:
> On 10/31/2012 02:39 PM, Christian Ambach wrote:
> 
> >> However, it's not in the posix_acls or vfs_acl_common code as far as I
> >> can tell, because valgrind over that code (now quite well exercised by
> >> samba.tests.posixacl) is clean.
> 
> In case it'll help, I added some talloc_report statements to
> get_nt_acl_internal before it frees the stackframe. See the attachment
> for details (did not want the list to arbitrarly break lines).
> 
> --- a/source3/modules/vfs_acl_common.c
> +++ b/source3/modules/vfs_acl_common.c
> @@ -670,6 +670,8 @@ static NTSTATUS 
> get_nt_acl_internal(vfs_handle_struct *handle,
>          /* The VFS API is that the ACL is expected to be on mem_ctx */
>          *ppdesc = talloc_move(mem_ctx, &psd);
> 
> +       talloc_report_full(frame, stderr);
> +       talloc_report_full(mem_ctx, stderr);
>          TALLOC_FREE(frame);
>          return NT_STATUS_OK;
>   }
> 

I think this is the fix.

It doesn't get covered by my tests, because so far they don't cover
directories (something I need to fix anyway), so if you can verify it in
your known failing case, it would be most appreciated.

(also attached is what I was using to try and eliminate the error to
either in posix_acls.c or vfs_acl_common.c, in case you were curious,
but in the end it was old-fashioned manual inspection that found it)

Thanks!

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-vfs_acl_common-In-add_directory_inheritable_componen.patch
Type: text/x-patch
Size: 1017 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20121101/4f69bf94/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debugging.patch
Type: text/x-patch
Size: 1733 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20121101/4f69bf94/attachment-0001.bin>


More information about the samba-technical mailing list