1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

dsdb: Use ldb_init() to make the ldb_context in dsdb audit tests

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Jun  9 17:42:38 CEST 2018 on sn-devel-144
This commit is contained in:
Andrew Bartlett 2018-06-07 09:50:15 +02:00
parent 1b07f13372
commit 81f7ecc2a7
3 changed files with 28 additions and 28 deletions

View File

@ -81,7 +81,7 @@ static void test_has_password_changed(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
/*
* Empty message
@ -196,7 +196,7 @@ static void test_get_password_action(void **state)
struct dsdb_control_password_acl_validation *pav = NULL;
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
/*
* Add request, will always be a reset
@ -292,7 +292,7 @@ static void test_operation_json_empty(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
ac = talloc_zero(ctx, struct audit_context);
module = talloc_zero(ctx, struct ldb_module);
@ -423,7 +423,7 @@ static void test_operation_json(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
ac = talloc_zero(ctx, struct audit_context);
GUID_from_string(TRANSACTION, &transaction_id);
@ -618,7 +618,7 @@ static void test_as_system_operation_json(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
ac = talloc_zero(ctx, struct audit_context);
GUID_from_string(TRANSACTION, &transaction_id);
@ -793,7 +793,7 @@ static void test_password_change_json_empty(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
ac = talloc_zero(ctx, struct audit_context);
module = talloc_zero(ctx, struct ldb_module);
@ -892,7 +892,7 @@ static void test_password_change_json(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
ac = talloc_zero(ctx, struct audit_context);
GUID_from_string(TRANSACTION, &transaction_id);
@ -1151,7 +1151,7 @@ static void test_replicated_update_json_empty(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
ac = talloc_zero(ctx, struct audit_context);
module = talloc_zero(ctx, struct ldb_module);
@ -1287,7 +1287,7 @@ static void test_replicated_update_json(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
ac = talloc_zero(ctx, struct audit_context);
GUID_from_string(TRANSACTION, &transaction_id);
@ -1419,7 +1419,7 @@ static void test_operation_hr_empty(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
ac = talloc_zero(ctx, struct audit_context);
module = talloc_zero(ctx, struct ldb_module);
@ -1491,7 +1491,7 @@ static void test_operation_hr(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
ac = talloc_zero(ctx, struct audit_context);
GUID_from_string(TRANSACTION, &transaction_id);
@ -1593,7 +1593,7 @@ static void test_as_system_operation_hr(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
ac = talloc_zero(ctx, struct audit_context);
GUID_from_string(TRANSACTION, &transaction_id);
@ -1680,7 +1680,7 @@ static void test_password_change_hr_empty(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
ac = talloc_zero(ctx, struct audit_context);
module = talloc_zero(ctx, struct ldb_module);
@ -1749,7 +1749,7 @@ static void test_password_change_hr(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
ac = talloc_zero(ctx, struct audit_context);
GUID_from_string(TRANSACTION, &transaction_id);
@ -2081,7 +2081,7 @@ static void test_replicated_update_hr_empty(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
ac = talloc_zero(ctx, struct audit_context);
module = talloc_zero(ctx, struct ldb_module);
@ -2155,7 +2155,7 @@ static void test_replicated_update_hr(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
ac = talloc_zero(ctx, struct audit_context);
GUID_from_string(TRANSACTION, &transaction_id);

View File

@ -469,7 +469,7 @@ static void test_dsdb_audit_get_remote_address(void **state)
* Test a freshly initialized ldb
* should return NULL
*/
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
ts = dsdb_audit_get_remote_address(ldb);
assert_null(ts);
@ -503,7 +503,7 @@ static void test_dsdb_audit_get_ldb_error_string(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
module = talloc_zero(ctx, struct ldb_module);
module->ldb = ldb;
@ -543,7 +543,7 @@ static void test_dsdb_audit_get_user_sid(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
module = talloc_zero(ctx, struct ldb_module);
module->ldb = ldb;
@ -624,7 +624,7 @@ static void test_dsdb_audit_get_actual_sid(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
/*
* Freshly initialised structures, will be no session data
@ -703,7 +703,7 @@ static void test_dsdb_audit_is_system_session(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
module = talloc_zero(ctx, struct ldb_module);
module->ldb = ldb;
@ -791,7 +791,7 @@ static void test_dsdb_audit_get_unique_session_token(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
module = talloc_zero(ctx, struct ldb_module);
module->ldb = ldb;
@ -849,7 +849,7 @@ static void test_dsdb_audit_get_actual_unique_session_token(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
/*
* Test a freshly initialized ldb
@ -900,7 +900,7 @@ static void test_dsdb_audit_get_remote_host(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
/*
* Test a freshly initialized ldb
@ -946,7 +946,7 @@ static void test_dsdb_audit_get_primary_dn(void **state)
req = talloc_zero(ctx, struct ldb_request);
msg = talloc_zero(ctx, struct ldb_message);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
dn = ldb_dn_new(ctx, ldb, DN);
/*
@ -1112,7 +1112,7 @@ static void test_dsdb_audit_get_secondary_dn(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
req = talloc_zero(ctx, struct ldb_request);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
dn = ldb_dn_new(ctx, ldb, DN);
/*

View File

@ -259,7 +259,7 @@ static void test_audit_group_hr(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
GUID_from_string(TRANSACTION, &transaction_id);
@ -627,7 +627,7 @@ static void test_audit_group_json(void **state)
TALLOC_CTX *ctx = talloc_new(NULL);
ldb = talloc_zero(ctx, struct ldb_context);
ldb = ldb_init(ctx, NULL);
GUID_from_string(TRANSACTION, &transaction_id);