summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-11-30 20:33:51 +0100
committerVolker Lendecke <vl@sernet.de>2007-11-30 22:25:01 +0100
commitcfbbeebbc6d8c6197e277c7edaeec14f4ac3ef93 (patch)
tree24d661cb67b88d2a7034615a948c2a90c5179396 /source3/lib
parenta43e3f98adae129c1e9f89c4e36d5dcf3f7b9642 (diff)
downloadsamba-cfbbeebbc6d8c6197e277c7edaeec14f4ac3ef93.tar.gz
samba-cfbbeebbc6d8c6197e277c7edaeec14f4ac3ef93.tar.bz2
samba-cfbbeebbc6d8c6197e277c7edaeec14f4ac3ef93.zip
Avoid to include net prototypes, just reference user creds.
Guenther (This used to be commit 09e01a47164702f67403e61bc478d1cb54f0508e)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/netapi/joindomain.c23
1 files 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;