summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-28 10:39:52 -0700
committerAndrew Tridgell <tridge@samba.org>2010-09-28 11:36:40 -0700
commitd4939ce4fc5e61c96e047b6a61a5502335da8926 (patch)
tree11e976a289377ba141a05f02ac569df0dd010c73 /source4/rpc_server
parentcd3eddbb59a21534f5a854b9a1fb1419530cca3f (diff)
downloadsamba-d4939ce4fc5e61c96e047b6a61a5502335da8926.tar.gz
samba-d4939ce4fc5e61c96e047b6a61a5502335da8926.tar.bz2
samba-d4939ce4fc5e61c96e047b6a61a5502335da8926.zip
s4-drs: moved the drs_ObjectIdentifier handling to dsdb_dn.c
this will be used outside of the drs server. This also fixes the handling of the ndr_size elements of the drs_ObjectIdentifier
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/drsuapi/drsutil.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/source4/rpc_server/drsuapi/drsutil.c b/source4/rpc_server/drsuapi/drsutil.c
index 5b5e14aea4..f88af93354 100644
--- a/source4/rpc_server/drsuapi/drsutil.c
+++ b/source4/rpc_server/drsuapi/drsutil.c
@@ -26,50 +26,6 @@
#include "param/param.h"
#include "auth/session.h"
-/*
- format a drsuapi_DsReplicaObjectIdentifier naming context as a string
- */
-char *drs_ObjectIdentifier_to_string(TALLOC_CTX *mem_ctx,
- struct drsuapi_DsReplicaObjectIdentifier *nc)
-{
- char *guid, *sid, *ret;
- guid = GUID_string(mem_ctx, &nc->guid);
- sid = dom_sid_string(mem_ctx, &nc->sid);
- ret = talloc_asprintf(mem_ctx, "<GUID=%s>;<SID=%s>;%s",
- guid, sid, nc->dn);
- talloc_free(guid);
- talloc_free(sid);
- return ret;
-}
-
-struct ldb_dn *drs_ObjectIdentifier_to_dn(TALLOC_CTX *mem_ctx,
- struct ldb_context *ldb,
- struct drsuapi_DsReplicaObjectIdentifier *nc)
-{
- char *guid = NULL, *sid = NULL, *ret = NULL;
- struct ldb_dn *new_dn;
- if (!GUID_all_zero(&nc->guid)) {
- guid = GUID_string(mem_ctx, &nc->guid);
- if (guid) {
- ret = talloc_asprintf_append(mem_ctx, "<GUID=%s>;", guid);
- }
- }
- if (nc->sid.sid_rev_num != 0) {
- sid = dom_sid_string(mem_ctx, &nc->sid);
- if (sid) {
- ret = talloc_asprintf_append(ret, "<SID=%s>;", sid);
- }
- }
- if (nc->dn) {
- ret = talloc_asprintf_append(ret, "%s", nc->dn);
- }
- new_dn = ldb_dn_new(mem_ctx, ldb, ret);
- talloc_free(guid);
- talloc_free(sid);
- talloc_free(ret);
- return new_dn;
-}
-
int drsuapi_search_with_extended_dn(struct ldb_context *ldb,
TALLOC_CTX *mem_ctx,
struct ldb_result **_res,