1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-21 20:23:50 +03:00

Getting rid of external credentials in libnetapi.

Guenther
This commit is contained in:
Günther Deschner
2007-12-18 02:15:49 +01:00
parent c818f5505a
commit c10481dba0
2 changed files with 11 additions and 8 deletions

View File

@@ -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);

View File

@@ -22,6 +22,9 @@
struct libnetapi_ctx {
int debuglevel;
char *username;
char *workgroup;
char *password;
};
WERROR libnetapi_init(struct libnetapi_ctx **ctx);