/** 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)
{
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);