summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema/schema_syntax.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-22 14:53:53 +1000
committerAndrew Tridgell <tridge@samba.org>2010-04-22 19:36:15 +1000
commit1ecefd74a2b7a6cec0c6ef765669eab0635e5568 (patch)
tree01fe69144b8726c930026f8d74fd7b18a3c9df22 /source4/dsdb/schema/schema_syntax.c
parent6669152a4a5919ecad633b594708d6b95577b4dc (diff)
downloadsamba-1ecefd74a2b7a6cec0c6ef765669eab0635e5568.tar.gz
samba-1ecefd74a2b7a6cec0c6ef765669eab0635e5568.tar.bz2
samba-1ecefd74a2b7a6cec0c6ef765669eab0635e5568.zip
s4-dsdb: added dsdb_get_extended_dn_sid()
This will be used by the RODC code Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/schema/schema_syntax.c')
-rw-r--r--source4/dsdb/schema/schema_syntax.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c
index 000473fd00..a0eed3d7c0 100644
--- a/source4/dsdb/schema/schema_syntax.c
+++ b/source4/dsdb/schema/schema_syntax.c
@@ -1614,7 +1614,6 @@ static WERROR dsdb_syntax_DN_ldb_to_drsuapi(struct ldb_context *ldb,
for (i=0; i < in->num_values; i++) {
struct drsuapi_DsReplicaObjectIdentifier3 id3;
enum ndr_err_code ndr_err;
- const DATA_BLOB *sid_blob;
struct ldb_dn *dn;
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
NTSTATUS status;
@@ -1636,17 +1635,11 @@ static WERROR dsdb_syntax_DN_ldb_to_drsuapi(struct ldb_context *ldb,
return ntstatus_to_werror(status);
}
- sid_blob = ldb_dn_get_extended_component(dn, "SID");
- if (sid_blob) {
-
- ndr_err = ndr_pull_struct_blob_all(sid_blob,
- tmp_ctx, schema->iconv_convenience, &id3.sid,
- (ndr_pull_flags_fn_t)ndr_pull_dom_sid);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- status = ndr_map_error2ntstatus(ndr_err);
- talloc_free(tmp_ctx);
- return ntstatus_to_werror(status);
- }
+ status = dsdb_get_extended_dn_sid(dn, &id3.sid, "SID");
+ if (!NT_STATUS_IS_OK(status) &&
+ !NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) {
+ talloc_free(tmp_ctx);
+ return ntstatus_to_werror(status);
}
id3.dn = ldb_dn_get_linearized(dn);