diff options
author | Günther Deschner <gd@samba.org> | 2007-12-18 02:15:49 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2007-12-21 15:29:10 +0100 |
commit | 9dc0ac4637fdd05a95099c0a6a857c51ca811453 (patch) | |
tree | dcdb3175943d445c3233594ca50c6d5b136b7bac | |
parent | c5a84374b6b2af7adff807a739fb1dc279bd4a58 (diff) | |
download | samba-9dc0ac4637fdd05a95099c0a6a857c51ca811453.tar.gz samba-9dc0ac4637fdd05a95099c0a6a857c51ca811453.tar.bz2 samba-9dc0ac4637fdd05a95099c0a6a857c51ca811453.zip |
Getting rid of external credentials in libnetapi.
Guenther
(This used to be commit c10481dba01a084b0f9c4265f3408a0ec9a8b646)
-rw-r--r-- | source3/lib/netapi/joindomain.c | 16 | ||||
-rw-r--r-- | source3/lib/netapi/netapi.h | 3 |
2 files changed, 11 insertions, 8 deletions
diff --git a/source3/lib/netapi/joindomain.c b/source3/lib/netapi/joindomain.c index bc26c22370..8287cd046f 100644 --- a/source3/lib/netapi/joindomain.c +++ b/source3/lib/netapi/joindomain.c @@ -20,10 +20,6 @@ #include "includes.h" #include "lib/netapi/joindomain.h" -extern const char *opt_user_name; -extern const char *opt_workgroup; -extern const char *opt_password; - static WERROR NetJoinDomainLocal(TALLOC_CTX *mem_ctx, const char *server_name, const char *domain_name, @@ -219,8 +215,10 @@ WERROR NetUnjoinDomain(const char *server_name, status = cli_full_connection(&cli, NULL, server_name, NULL, 0, "IPC$", "IPC", - opt_user_name, opt_workgroup, - opt_password, 0, Undefined, NULL); + ctx->username, + ctx->workgroup, + ctx->password, + 0, Undefined, NULL); if (!NT_STATUS_IS_OK(status)) { werr = ntstatus_to_werror(status); @@ -311,8 +309,10 @@ WERROR NetGetJoinInformation(const char *server_name, status = cli_full_connection(&cli, NULL, server_name, NULL, 0, "IPC$", "IPC", - opt_user_name, opt_workgroup, - opt_password, 0, Undefined, NULL); + ctx->username, + ctx->workgroup, + ctx->password, + 0, Undefined, NULL); if (!NT_STATUS_IS_OK(status)) { werr = ntstatus_to_werror(status); diff --git a/source3/lib/netapi/netapi.h b/source3/lib/netapi/netapi.h index 0810ecb7bc..0637570c3e 100644 --- a/source3/lib/netapi/netapi.h +++ b/source3/lib/netapi/netapi.h @@ -22,6 +22,9 @@ struct libnetapi_ctx { int debuglevel; + char *username; + char *workgroup; + char *password; }; WERROR libnetapi_init(struct libnetapi_ctx **ctx); |