Patches for DFS implementation

Matthieu Patou mat+Informatique.Samba at matws.net
Thu May 13 15:53:09 MDT 2010


Hi Metze,
Thank for your tests.
I'm a bit puzzled, as your trace show that requestedname is 
\samba.example.com\sysvol

#14 0x00000000006edbab in dodc_or_sysvol_referral (ctx=0x1e24e30, dfsreq=
       {max_referral_level = 4, servername = 0xe47f90 
"\\samba.example.com\\sysvol"}, requestedname=0xe47f90 
"\\samba.example.com\\sysvol", ldb=0xb03d70,
     trans=0x24709d0, req=0x174f370, lp_ctx=0xae8820)
     at ../smb_server/smb/trans2.c:1484
         nb_entries = 1
         current = 1

And in the code of dodc_or_sysvol_referral the parameter is passed 
without modification (well normally)
                                 status = 
fill_normal_dfs_referraltype(referral,
                                                 
dfsreq.max_referral_level, requestedname,
                                                 
talloc_asprintf(referral,"\\%s\\%s",set[i]->names[j],share), j==0);

and the error in your trace is at
#8  0x00000000005c2219 in ndr_push_dfs_normal_referral (ndr=0x1e19910,
     ndr_flags=2, r=0x2860a88) at default/librpc/gen_ndr/ndr_dfsblobs.c:384
         _status = 32767
         _flags_save_string = 2

It's when pushing DFS_path which is in fact requestedname.

I tried running this with valgrind and found errors of course but they 
were due to bad parenting and occured after talloc_free(context) when 
your occured before.
In anycase now valgrind is clean.

I attached a patch for fixing error can you try it and tell me if you 
still have pbs ?

Thanks.

Matthieu.


On 13/05/2010 23:37, Stefan (metze) Metzmacher wrote:
> Matthieu Patou schrieb:
>    
>> Hello this is a serie of 6 patches made for implementing Domain referral
>> in samba4.
>>
>> Those patches are made to allow s4 to respond to domain DFS referral
>> requests.
>>
>> This is highly desirable when you have more than 1 DC.
>> Please note that it's not the server side implementation of the DFS
>> replication protocol.
>> Here is the detail of the patches:
>>
>> 0001-pidl-fix-errors-and-improve-idl-in-dfsblobs.patch, This is a few
>> fixes for idl that I made in december that were found during the
>> developpement of the patches.
>> 0002-s4-fix-trailling-whitespace-in-trans2.c.patch, This is a formatting
>> patch for trans2.c
>> 0003-s4-Implement-GET_DFS_REFERRAL-for-domain-referral-re.patch, This is
>> the implementation of trans2/getreferrals requests for domain referrals
>> requests.
>> 0004-s4-torture-test-Adapt-ndr-dfsblobs-torture-test-to-n.patch, This
>> patch is to adapt the torture test to the renaming of functions in
>> dfsblobs.idl
>> 0005-s4-torture-Add-tests-for-dfs-referrals-handling-in-S.patch, This
>> patch is to add unittest for smb/trans2 requests. It has also been
>> tested with success against w2k8r2 server.
>> 0006-s4-add-dfs-smbtorture-to-selftests.patch, This patch is to add the
>> smbtorture tests to make tests.
>>
>> After I'm willing to change provision so that DC have the host msdfs =
>> yes parameter, andrew what's your point of view ?
>>
>> Jeremy, the torture tests will be a good start for us to tests the
>> capacity of s3 to handle get dfs referral requests when "plugged" into s4.
>>
>> Ps: this patches pass make test
>>      
> For me it crashes in samba4.dfs.domain
>
> metze
>
>    



More information about the samba-technical mailing list