Bug 9261 - ds_replica_sync fails when specifying a name and not a guid
Summary: ds_replica_sync fails when specifying a name and not a guid
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB (show other bugs)
Version: 4.0.0rc2
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-08 06:46 UTC by Matthieu Patou
Modified: 2012-10-15 09:56 UTC (History)
0 users

See Also:


Attachments
Proposed patch to fix the problem (922 bytes, patch)
2012-10-13 07:39 UTC, Matthieu Patou
metze: review+
jelmer: review+
abartlet: review+
Details
drsuapi_DsReplicaSync input structure as sent by the DRSR test driver. (256 bytes, application/octet-stream)
2012-10-13 20:15 UTC, Matthieu Patou
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthieu Patou 2012-10-08 06:46:48 UTC

    
Comment 1 Matthieu Patou 2012-10-13 07:39:18 UTC
Created attachment 8062 [details]
Proposed patch to fix the problem
Comment 2 Matthieu Patou 2012-10-13 07:41:12 UTC
Problem was that the idl for the string was incorrect a astring didn't represent data as it was on the wire.
Comment 3 Matthieu Patou 2012-10-13 20:12:34 UTC
The structure of drsuapi_DsReplicaSyncRequest1 is described in MS-DRSR.pdf 4.1.23.1.2 DRS_MSG_REPSYNC_V1:


typedef struct {
[ref] DSNAME* pNC;
UUID uuidDsaSrc;
[unique, string] char* pszDsaSrc;
ULONG ulOptions;
} DRS_MSG_REPSYNC_V1;

uuidDsaSrc: The DSA GUID.

pNC: A pointer to DSName of the root of an NC replica on the server.

The DRS_MSG_REPSYNC_V1 structure defines a request message sent to the
IDL_DRSReplicaSync method.

pszDsaSrc: The transport-specific NetworkAddress of a DC.

ulOptions: The DRS_OPTIONS flags.
Comment 4 Matthieu Patou 2012-10-13 20:15:42 UTC
Created attachment 8070 [details]
drsuapi_DsReplicaSync input structure as sent by the DRSR test driver.
Comment 5 Andrew Bartlett 2012-10-14 06:07:44 UTC
Comment on attachment 8062 [details]
Proposed patch to fix the problem

Isn't it more likely the string is in UTF8 rather than DOS?

I'm still +1 on this as better than it was before (astring is also DOS), but please investigate for a future patch to master.
Comment 6 Matthieu Patou 2012-10-14 06:38:30 UTC
(In reply to comment #5)
> Comment on attachment 8062 [details]
> Proposed patch to fix the problem
> 
> Isn't it more likely the string is in UTF8 rather than DOS?
> 
> I'm still +1 on this as better than it was before (astring is also DOS), but
> please investigate for a future patch to master.

Is AD supporting domains with non ascii chars ? 
As the dns name is in fact the guid + _msdcs + domain name the only part of utf8 can be in the domain name.
Comment 7 Jelmer Vernooij 2012-10-14 09:46:27 UTC
UTF-8 as encoding seems more plausible to me too. Either way, I agree with Andrew that this is an improvement over the current situation. Thanks for working on this!
Comment 8 Matthieu Patou 2012-10-14 21:12:21 UTC
Karolin, please pick up for rc3.

Thanks
Comment 9 Stefan Metzmacher 2012-10-15 06:54:47 UTC
Comment on attachment 8062 [details]
Proposed patch to fix the problem

Looks good
Comment 10 Karolin Seeger 2012-10-15 09:56:55 UTC
Pushed to autobuild-v4-0-test.
Closing out bug report.

Thanks!