wmi: Use cli_credentials.
authorJelmer Vernooij <jelmer@samba.org>
Tue, 30 Sep 2008 02:22:24 +0000 (04:22 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 30 Sep 2008 02:22:24 +0000 (04:22 +0200)
source4/lib/wmi/wmi.h
source4/lib/wmi/wmicore.c

index 32543a8ca7fcc6bd409cf04164079359b923181e..46c9b70cdbccf2a00b426b3bd38d81f2207eb154 100644 (file)
@@ -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);
index 49c1e033125e27dd8cbecf6714c2c7f0979b2e7d..3ac6c89292b9a8ce000580d440b04696be27401a 100644 (file)
@@ -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);