diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-01-13 12:52:56 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:51:00 -0500 |
commit | b15582ed816f3d477f978976f43b82cfa90bf6dc (patch) | |
tree | 01a6d0f6eaa039fe1262945c7dc2320f942e379a /source4/libnet/libnet_samdump_keytab.c | |
parent | 867ae22a9bf4cfe829e405fcbbb9de994505fc30 (diff) | |
download | samba-b15582ed816f3d477f978976f43b82cfa90bf6dc.tar.gz samba-b15582ed816f3d477f978976f43b82cfa90bf6dc.tar.bz2 samba-b15582ed816f3d477f978976f43b82cfa90bf6dc.zip |
r12903: Factor out a new routine libnet_RpcConnectDCInfo, to both connect to
the remote sever, and to query it for domain information.
Provide and use this information in the SamSync/Vampire callbacks, to allow a
parallel connection to LDAP, if we are talking to AD. This allows us
to get at some important attributes not exposed in the old protocol.
With this, we are able to do a all-GUI vampire of a AD domain from
SWAT, including getting all the SIDs, servicePrincipalNames and the
like correct.
Andrew Bartlett
(This used to be commit 918358cee0b4a1b2c9bc9e68d9d53428a634281e)
Diffstat (limited to 'source4/libnet/libnet_samdump_keytab.c')
-rw-r--r-- | source4/libnet/libnet_samdump_keytab.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/libnet/libnet_samdump_keytab.c b/source4/libnet/libnet_samdump_keytab.c index f16e0ae383..de575ec668 100644 --- a/source4/libnet/libnet_samdump_keytab.c +++ b/source4/libnet/libnet_samdump_keytab.c @@ -27,7 +27,6 @@ static NTSTATUS samdump_keytab_handle_user(TALLOC_CTX *mem_ctx, const char *keytab_name, - struct creds_CredentialState *creds, struct netr_DELTA_ENUM *delta) { struct netr_DELTA_USER *user = delta->delta_union.user; @@ -66,7 +65,6 @@ static NTSTATUS samdump_keytab_handle_user(TALLOC_CTX *mem_ctx, static NTSTATUS libnet_samdump_keytab_fn(TALLOC_CTX *mem_ctx, void *private, - struct creds_CredentialState *creds, enum netr_SamDatabaseID database, struct netr_DELTA_ENUM *delta, char **error_string) @@ -82,7 +80,6 @@ static NTSTATUS libnet_samdump_keytab_fn(TALLOC_CTX *mem_ctx, if (database == SAM_DATABASE_DOMAIN) { nt_status = samdump_keytab_handle_user(mem_ctx, keytab_name, - creds, delta); break; } @@ -101,11 +98,13 @@ NTSTATUS libnet_SamDump_keytab(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, r2.out.error_string = NULL; r2.in.binding_string = r->in.binding_string; + r2.in.init_fn = NULL; r2.in.delta_fn = libnet_samdump_keytab_fn; r2.in.fn_ctx = discard_const(r->in.keytab_name); r2.in.machine_account = r->in.machine_account; nt_status = libnet_SamSync_netlogon(ctx, mem_ctx, &r2); r->out.error_string = r2.out.error_string; + talloc_steal(mem_ctx, r->out.error_string); if (!NT_STATUS_IS_OK(nt_status)) { return nt_status; |