diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-12-02 15:35:27 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:28:47 -0500 |
commit | 6d7630a5166b96ac50be2d49077b3819dc9a1bb5 (patch) | |
tree | 91ca5cb4156fe90df0881f6447677ceae2ae603e | |
parent | a6e2442a5f4f5f114bbb75c69b29b4fe8381b1b1 (diff) | |
download | samba-6d7630a5166b96ac50be2d49077b3819dc9a1bb5.tar.gz samba-6d7630a5166b96ac50be2d49077b3819dc9a1bb5.tar.bz2 samba-6d7630a5166b96ac50be2d49077b3819dc9a1bb5.zip |
r20011: define libnet_BecomeDC_state struct and add some dummy functions
metze
(This used to be commit 2a50a885ed933c516430eb4284eb4badb6ab67ff)
-rw-r--r-- | source4/libnet/libnet_become_dc.c | 59 |
1 files changed, 58 insertions, 1 deletions
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c index 3bf4d38335..5cbb50055f 100644 --- a/source4/libnet/libnet_become_dc.c +++ b/source4/libnet/libnet_become_dc.c @@ -22,14 +22,69 @@ #include "libnet/libnet.h" #include "libcli/composite/composite.h" +struct libnet_BecomeDC_state { + struct libnet_context *libnet; + + struct becomeDC_ldap { + struct ldb_context *ldb; + struct ldb_message *rootdse; + } ldap1; + + struct { + const char *dns_name; + const char *netbios_name; + const char *domain_dn_str; + const char *config_dn_str; + const char *schema_dn_str; + } domain_info; + + struct { + const char *dns_name; + const char *netbios_name; + const char *address; + const char *server_dn_str; + const char *ntds_dn_str; + } source_dsa; + + struct { + const char *hostname; + } dest_dsa; +}; + + +static NTSTATUS becomeDC_ldap_connect(struct libnet_BecomeDC_state *s, struct becomeDC_ldap *ldap) +{ + return NT_STATUS_NOT_IMPLEMENTED; +} + +static NTSTATUS becomeDC_ldap1_requests(struct libnet_BecomeDC_state *s) +{ + return NT_STATUS_NOT_IMPLEMENTED; +} + struct composite_context *libnet_BecomeDC_send(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, struct libnet_BecomeDC *r) { struct composite_context *c; + struct libnet_BecomeDC_state *s; c = composite_create(mem_ctx, ctx->event_ctx); if (c == NULL) return NULL; - composite_error(c, NT_STATUS_NOT_IMPLEMENTED); + s = talloc_zero(c, struct libnet_BecomeDC_state); + if (composite_nomem(s, c)) return c; + c->private_data = s; + + s->libnet = ctx; + + s->source_dsa.address = talloc_strdup(s, r->in.dest_address); + if (composite_nomem(s->source_dsa.address, c)) return c; + + c->status = becomeDC_ldap_connect(s, &s->ldap1); + if (!composite_is_ok(c)) return c; + + c->status = becomeDC_ldap1_requests(s); + if (!composite_is_ok(c)) return c; + return c; } @@ -39,6 +94,8 @@ NTSTATUS libnet_BecomeDC_recv(struct composite_context *c, TALLOC_CTX *mem_ctx, status = composite_wait(c); + ZERO_STRUCT(r->out); + talloc_free(c); return status; } |