From cfbbeebbc6d8c6197e277c7edaeec14f4ac3ef93 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 30 Nov 2007 20:33:51 +0100 Subject: Avoid to include net prototypes, just reference user creds. Guenther (This used to be commit 09e01a47164702f67403e61bc478d1cb54f0508e) --- source3/lib/netapi/joindomain.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/source3/lib/netapi/joindomain.c b/source3/lib/netapi/joindomain.c index 66f0137cad..e0986ce364 100644 --- a/source3/lib/netapi/joindomain.c +++ b/source3/lib/netapi/joindomain.c @@ -18,7 +18,10 @@ */ #include "includes.h" -#include "utils/net.h" + +extern const char *opt_user_name; +extern const char *opt_workgroup; +extern const char *opt_password; WERROR NetJoinDomain(const char *server_name, const char *domain_name, @@ -53,9 +56,12 @@ WERROR NetJoinDomain(const char *server_name, goto done; } - status = net_make_ipc_connection_ex(domain_name, - server_name, - NULL, 0, &cli); + status = cli_full_connection(&cli, NULL, server_name, + NULL, 0, + "IPC$", "IPC", + opt_user_name, opt_workgroup, + opt_password, 0, Undefined, NULL); + if (!NT_STATUS_IS_OK(status)) { werr = ntstatus_to_werror(status); goto done; @@ -127,9 +133,12 @@ WERROR NetUnjoinDomain(const char *server_name, goto done; } - status = net_make_ipc_connection_ex(NULL, - server_name, - NULL, 0, &cli); + status = cli_full_connection(&cli, NULL, server_name, + NULL, 0, + "IPC$", "IPC", + opt_user_name, opt_workgroup, + opt_password, 0, Undefined, NULL); + if (!NT_STATUS_IS_OK(status)) { werr = ntstatus_to_werror(status); goto done; -- cgit