summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/wmi/wmi.h2
-rw-r--r--source4/lib/wmi/wmicore.c14
2 files changed, 2 insertions, 14 deletions
diff --git a/source4/lib/wmi/wmi.h b/source4/lib/wmi/wmi.h
index 32543a8ca7..46c9b70cdb 100644
--- a/source4/lib/wmi/wmi.h
+++ b/source4/lib/wmi/wmi.h
@@ -27,7 +27,7 @@
/** FIXME: Use credentials struct rather than user/password here */
WERROR WBEM_ConnectServer(struct com_context *ctx, const char *server, const char *nspace,
- const char *user, const char *password,
+ struct cli_credentials *credentials,
const char *locale, uint32_t flags, const char *authority,
struct IWbemContext* wbem_ctx, struct IWbemServices** services);
const char *wmi_errstr(WERROR werror);
diff --git a/source4/lib/wmi/wmicore.c b/source4/lib/wmi/wmicore.c
index 49c1e03312..3ac6c89292 100644
--- a/source4/lib/wmi/wmicore.c
+++ b/source4/lib/wmi/wmicore.c
@@ -51,7 +51,7 @@ void wmi_init(struct com_context **ctx, struct cli_credentials *credentials)
/** FIXME: Use credentials struct rather than user/password here */
WERROR WBEM_ConnectServer(struct com_context *ctx, const char *server, const uint16_t *nspace,
- const char *user, const char *password,
+ struct cli_credentials *credentials,
const char *locale, uint32_t flags, const char *authority,
struct IWbemContext* wbem_ctx, struct IWbemServices** services)
{
@@ -61,18 +61,6 @@ WERROR WBEM_ConnectServer(struct com_context *ctx, const char *server, const uin
struct IUnknown **mqi;
struct IWbemLevel1Login *pL;
- if (user) {
- char *cred;
- struct cli_credentials *cc;
-
- cred = talloc_asprintf(NULL, "%s%%%s", user, password);
- cc = cli_credentials_init(cred);
- cli_credentials_set_conf(cc, global_loadparm);
- cli_credentials_parse_string(cc, cred, CRED_SPECIFIED);
- dcom_add_server_credentials(ctx, server, cc);
- talloc_free(cred);
- }
-
GUID_from_string(CLSID_WBEMLEVEL1LOGIN, &clsid);
GUID_from_string(COM_IWBEMLEVEL1LOGIN_UUID, &iid);
result = dcom_create_object(ctx, &clsid, server, 1, &iid, &mqi, &coresult);