summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/ldb.i17
-rw-r--r--source4/lib/registry/tests/generic.c6
-rw-r--r--source4/lib/wmi/wmi.h2
-rw-r--r--source4/lib/wmi/wmicore.c14
4 files changed, 5 insertions, 34 deletions
diff --git a/source4/lib/ldb/ldb.i b/source4/lib/ldb/ldb.i
index 1e3a3169c8..024ba1959a 100644
--- a/source4/lib/ldb/ldb.i
+++ b/source4/lib/ldb/ldb.i
@@ -1219,22 +1219,6 @@ int py_module_del_transaction(struct ldb_module *mod)
return LDB_SUCCESS;
}
-int py_module_wait(struct ldb_handle *mod, enum ldb_wait_type wait_type)
-{
- PyObject *py_ldb = mod->private_data;
- PyObject *py_result;
-
- py_result = PyObject_CallMethod(py_ldb, "wait", "i", wait_type);
-
- if (py_result == NULL) {
- return LDB_ERR_OPERATIONS_ERROR;
- }
-
- Py_DECREF(py_result);
-
- return LDB_SUCCESS;
-}
-
int py_module_sequence_number(struct ldb_module *mod, struct ldb_request *req)
{
PyObject *py_ldb = mod->private_data;
@@ -1308,7 +1292,6 @@ int py_module_init (struct ldb_module *mod)
$1->start_transaction = py_module_start_transaction;
$1->end_transaction = py_module_end_transaction;
$1->del_transaction = py_module_del_transaction;
- $1->wait = py_module_wait;
$1->sequence_number = py_module_sequence_number;
}
diff --git a/source4/lib/registry/tests/generic.c b/source4/lib/registry/tests/generic.c
index 6eae26bc46..2b7eb838ba 100644
--- a/source4/lib/registry/tests/generic.c
+++ b/source4/lib/registry/tests/generic.c
@@ -53,7 +53,7 @@ static bool test_reg_val_data_string_dword(struct torture_context *ctx)
static bool test_reg_val_data_string_sz(struct torture_context *ctx)
{
DATA_BLOB db;
- db.length = convert_string_talloc(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UNIX, CH_UTF16,
+ db.length = convert_string_talloc(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UTF8, CH_UTF16,
"bla", 3, (void **)&db.data);
torture_assert_str_equal(ctx, "bla",
reg_val_data_string(ctx, lp_iconv_convenience(ctx->lp_ctx), REG_SZ, db),
@@ -88,7 +88,7 @@ static bool test_reg_val_data_string_empty(struct torture_context *ctx)
static bool test_reg_val_description(struct torture_context *ctx)
{
DATA_BLOB data;
- data.length = convert_string_talloc(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UNIX, CH_UTF16,
+ data.length = convert_string_talloc(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UTF8, CH_UTF16,
"stationary traveller",
strlen("stationary traveller"),
(void **)&data.data);
@@ -102,7 +102,7 @@ static bool test_reg_val_description(struct torture_context *ctx)
static bool test_reg_val_description_nullname(struct torture_context *ctx)
{
DATA_BLOB data;
- data.length = convert_string_talloc(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UNIX, CH_UTF16,
+ data.length = convert_string_talloc(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UTF8, CH_UTF16,
"west berlin",
strlen("west berlin"),
(void **)&data.data);
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);