[PATCH] Allow reparse points to be created/read/removed over SMB2 from smbclient.

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Nov 30 11:48:01 UTC 2017


On Wed, Nov 29, 2017 at 03:22:40PM -0800, Jeremy Allison via samba-technical wrote:
> Latest part of my quest to get a working test environment
> for reparse points so I can implement them in smbd.
> 
> This patchset fixes up the code in libsmb/clisymlink.c
> and libsmb/cli_smb2_fnum.c to be able to do async
> reparse point get/set.
> 
> I've tested against Windows (which is currently the
> best I can do). Once this goes in I can start using
> this to create smbtorture tests against smbd with
> an implementation of storing reparse points inside
> extended attributes on files/directories.

> +static void cli_close_done(struct tevent_req *subreq)
> +{
> +	struct tevent_req *req = tevent_req_callback_data(
> +		subreq, struct tevent_req);
> +	NTSTATUS status = tevent_req_simple_recv_ntstatus(subreq);

Please don't call tevent_req_simple_recv_ntstatus directly from a
_done routine, please create a wrapper for it. It might be idempotent,
but it is this kind of confusion around this routine that for example
caused the valgrind error you just fixed.

Maybe it's better to just remove this obviously very misleading
function and expand it into all its users. Do you want me to do this
to avoid this kind of discussion in the future? I can probably pretty
quickly get this patch done to remove this flawed abstraction.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de



More information about the samba-technical mailing list