diff options
author | Rafal Szczesniak <mimir@samba.org> | 2005-11-16 20:52:12 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:46:21 -0500 |
commit | d6017d3969c08c8af0492d90f7116f7238cab302 (patch) | |
tree | 41b826023750dfd72dbc2b65c0132dae5baeb322 | |
parent | 5518741f3fb350cd08fc09e18deca1eede7e26f5 (diff) | |
download | samba-d6017d3969c08c8af0492d90f7116f7238cab302.tar.gz samba-d6017d3969c08c8af0492d90f7116f7238cab302.tar.bz2 samba-d6017d3969c08c8af0492d90f7116f7238cab302.zip |
r11749: 1) Buffer allocation's been moved and isn't needed here.
2) Connect to a server instead of pdc after locating it.
rafal
(This used to be commit a7bf9ada34c31f26d13c1575de2ec79ea5948a71)
-rw-r--r-- | source4/libnet/libnet_user.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source4/libnet/libnet_user.c b/source4/libnet/libnet_user.c index 2b648e708a..379989dd2b 100644 --- a/source4/libnet/libnet_user.c +++ b/source4/libnet/libnet_user.c @@ -33,8 +33,6 @@ NTSTATUS libnet_CreateUser(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, stru struct libnet_rpc_useradd user_io; const char *address; - address = talloc_array(mem_ctx, const char, 16); - /* find domain pdc */ fp.in.hostname = r->in.domain_name; fp.in.methods = NULL; @@ -44,7 +42,7 @@ NTSTATUS libnet_CreateUser(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, stru if (!NT_STATUS_IS_OK(status)) return status; /* connect rpc service of remote server */ - cn.level = LIBNET_RPC_CONNECT_PDC; + cn.level = LIBNET_RPC_CONNECT_SERVER; cn.in.domain_name = talloc_strdup(mem_ctx, *fp.out.address); cn.in.dcerpc_iface_name = DCERPC_SAMR_NAME; cn.in.dcerpc_iface_uuid = DCERPC_SAMR_UUID; |