diff options
author | Günther Deschner <gd@samba.org> | 2007-11-30 20:33:51 +0100 |
---|---|---|
committer | Volker Lendecke <vl@sernet.de> | 2007-11-30 22:25:01 +0100 |
commit | cfbbeebbc6d8c6197e277c7edaeec14f4ac3ef93 (patch) | |
tree | 24d661cb67b88d2a7034615a948c2a90c5179396 /source3 | |
parent | a43e3f98adae129c1e9f89c4e36d5dcf3f7b9642 (diff) | |
download | samba-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')
-rw-r--r-- | source3/lib/netapi/joindomain.c | 23 |
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; |