From c41944b9f9e6dc5287065b24ab1c1fc20ec36cb4 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 13 Feb 2008 10:36:49 +0100 Subject: spoolss.idl: improve idl for EnumPrinterData and not use 'lstring' any more metze (This used to be commit d6cdddbcf37d120cb365bc7f8188858c8776e2e0) --- source4/torture/rpc/spoolss.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 23b4aad30b..4a6ff480c4 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -1178,16 +1178,23 @@ static bool test_EnumPrinterData(struct torture_context *tctx, struct dcerpc_pip NTSTATUS status; struct spoolss_EnumPrinterData r; + ZERO_STRUCT(r); r.in.handle = handle; r.in.enum_index = 0; do { - uint32_t data_size; - - r.in.value_offered = 0; - data_size = 0; - r.in.data_size = &data_size; - r.out.data_size = &data_size; + uint32_t value_size = 0; + uint32_t data_size = 0; + uint32_t printerdata_type = 0; + DATA_BLOB data = data_blob(NULL,0); + + r.in.value_offered = value_size; + r.out.value_needed = &value_size; + r.in.data_offered = data_size; + r.out.data_needed = &data_size; + + r.out.printerdata_type = &printerdata_type; + r.out.buffer = &data; torture_comment(tctx, "Testing EnumPrinterData\n"); @@ -1195,7 +1202,8 @@ static bool test_EnumPrinterData(struct torture_context *tctx, struct dcerpc_pip torture_assert_ntstatus_ok(tctx, status, "EnumPrinterData failed"); - r.in.value_offered = r.out.value_needed; + r.in.value_offered = value_size; + r.in.data_offered = data_size; status = dcerpc_spoolss_EnumPrinterData(p, tctx, &r); -- cgit From a9d30b0d61a6a3363dc659c3e07ce1615c5e85df Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 13 Feb 2008 14:52:53 +0100 Subject: torture/eventlog: fix crash bugs! This bug was introduced in 92b8bde561277a6b83048ce003cc29ff1b380255 and this shows that we need to be very, very careful in changing idl elements from scalars to [ref] pointers! metze (This used to be commit 3ec4bce0b64764e364aedea2800eed296805c51e) --- source4/torture/rpc/eventlog.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/eventlog.c b/source4/torture/rpc/eventlog.c index 047146edaf..4701fdfe4d 100644 --- a/source4/torture/rpc/eventlog.c +++ b/source4/torture/rpc/eventlog.c @@ -67,11 +67,14 @@ static bool test_GetNumRecords(struct torture_context *tctx, struct dcerpc_pipe struct eventlog_GetNumRecords r; struct eventlog_CloseEventLog cr; struct policy_handle handle; + uint32_t number = 0; if (!get_policy_handle(tctx, p, &handle)) return false; + ZERO_STRUCT(r); r.in.handle = &handle; + r.out.number = &number; torture_assert_ntstatus_ok(tctx, dcerpc_eventlog_GetNumRecords(p, tctx, &r), @@ -98,6 +101,7 @@ static bool test_ReadEventLog(struct torture_context *tctx, if (!get_policy_handle(tctx, p, &handle)) return false; + ZERO_STRUCT(r); r.in.offset = 0; r.in.handle = &handle; r.in.flags = EVENTLOG_BACKWARDS_READ|EVENTLOG_SEQUENTIAL_READ; @@ -107,11 +111,15 @@ static bool test_ReadEventLog(struct torture_context *tctx, struct eventlog_Record rec; struct ndr_pull *ndr; enum ndr_err_code ndr_err; + uint32_t sent_size = 0; + uint32_t real_size = 0; /* Read first for number of bytes in record */ r.in.number_of_bytes = 0; r.out.data = NULL; + r.out.sent_size = &sent_size; + r.out.real_size = &real_size; status = dcerpc_eventlog_ReadEventLogW(p, tctx, &r); -- cgit From 60e205c34c4a28060f47ba1aa7c7592d33d302bc Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 13 Feb 2008 16:20:23 +0100 Subject: torture/eventlog: the NTSTATUS of dcerpc_ functions is the same as r.out.result metze (This used to be commit 0c5539e5fedd4123f61d50ee29acdc5a5f0faf76) --- source4/torture/rpc/eventlog.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/eventlog.c b/source4/torture/rpc/eventlog.c index 4701fdfe4d..feeeb9330b 100644 --- a/source4/torture/rpc/eventlog.c +++ b/source4/torture/rpc/eventlog.c @@ -127,8 +127,6 @@ static bool test_ReadEventLog(struct torture_context *tctx, break; } - torture_assert_ntstatus_ok(tctx, status, "ReadEventLog failed"); - torture_assert_ntstatus_equal(tctx, r.out.result, NT_STATUS_BUFFER_TOO_SMALL, "ReadEventLog failed"); -- cgit From 97c77cffade1b99f8c1345c8516a856644f40b01 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 19 Feb 2008 14:12:05 +0100 Subject: Avoid use of global_loadparm. (This used to be commit e6751a3ca40d968f084642229845a729bd916222) --- source4/torture/rpc/samsync.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c index 1f7f9f463e..865ebf9fd2 100644 --- a/source4/torture/rpc/samsync.c +++ b/source4/torture/rpc/samsync.c @@ -398,7 +398,7 @@ static bool samsync_handle_policy(TALLOC_CTX *mem_ctx, struct samsync_state *sam return true; } -static bool samsync_handle_user(TALLOC_CTX *mem_ctx, struct samsync_state *samsync_state, +static bool samsync_handle_user(struct torture_context *tctx, TALLOC_CTX *mem_ctx, struct samsync_state *samsync_state, int database_id, struct netr_DELTA_ENUM *delta) { uint32_t rid = delta->delta_id_union.rid; @@ -548,7 +548,7 @@ static bool samsync_handle_user(TALLOC_CTX *mem_ctx, struct samsync_state *samsy data.data = user->user_private_info.SensitiveData; data.length = user->user_private_info.DataLength; creds_arcfour_crypt(samsync_state->creds, data.data, data.length); - ndr_err = ndr_pull_struct_blob(&data, mem_ctx, lp_iconv_convenience(global_loadparm), &keys, (ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS); + ndr_err = ndr_pull_struct_blob(&data, mem_ctx, lp_iconv_convenience(tctx->lp_ctx), &keys, (ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS); if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { if (keys.keys.keys2.lmpassword.length == 16) { sam_rid_crypt(rid, keys.keys.keys2.lmpassword.pwd.hash, lm_hash.hash, 0); @@ -1101,8 +1101,9 @@ static bool samsync_handle_account(TALLOC_CTX *mem_ctx, struct samsync_state *sa /* try a netlogon DatabaseSync */ -static bool test_DatabaseSync(struct samsync_state *samsync_state, - TALLOC_CTX *mem_ctx) +static bool test_DatabaseSync(struct torture_context *tctx, + struct samsync_state *samsync_state, + TALLOC_CTX *mem_ctx) { NTSTATUS status; TALLOC_CTX *loop_ctx, *delta_ctx, *trustdom_ctx; @@ -1162,7 +1163,7 @@ static bool test_DatabaseSync(struct samsync_state *samsync_state, } break; case NETR_DELTA_USER: - if (!samsync_handle_user(delta_ctx, samsync_state, + if (!samsync_handle_user(tctx, delta_ctx, samsync_state, r.in.database_id, &r.out.delta_enum_array->delta_enum[d])) { printf("Failed to handle DELTA_USER\n"); ret = false; @@ -1611,7 +1612,7 @@ bool torture_rpc_samsync(struct torture_context *torture) ret = false; } - if (!test_DatabaseSync(samsync_state, mem_ctx)) { + if (!test_DatabaseSync(torture, samsync_state, mem_ctx)) { printf("DatabaseSync failed\n"); ret = false; } -- cgit From 8fce27ad018c2a1db048d9e7c89881f877ea3a73 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 19 Feb 2008 14:13:14 +0100 Subject: samba3rpc: Remove use of global_loadparm. (This used to be commit b3d084170e01fc678f9be6c280c52763ead52959) --- source4/torture/rpc/samba3rpc.c | 73 ++++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 31 deletions(-) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c index b08cd05bdb..779a28e126 100644 --- a/source4/torture/rpc/samba3rpc.c +++ b/source4/torture/rpc/samba3rpc.c @@ -806,6 +806,7 @@ static bool join3(struct smbcli_state *cli, */ static bool auth2(struct smbcli_state *cli, + struct loadparm_context *lp_ctx, struct cli_credentials *wks_cred) { TALLOC_CTX *mem_ctx; @@ -829,7 +830,7 @@ static bool auth2(struct smbcli_state *cli, net_pipe = dcerpc_pipe_init(mem_ctx, cli->transport->socket->event.ctx, - lp_iconv_convenience(global_loadparm)); + lp_iconv_convenience(lp_ctx)); if (net_pipe == NULL) { d_printf("dcerpc_pipe_init failed\n"); goto done; @@ -1204,7 +1205,7 @@ bool torture_netlogon_samba3(struct torture_context *torture) int j; - if (!auth2(cli, wks_creds)) { + if (!auth2(cli, torture->lp_ctx, wks_creds)) { d_printf("auth2 failed\n"); goto done; } @@ -1283,7 +1284,7 @@ static bool test_join3(struct torture_context *tctx, cmdline_credentials, cli_credentials_get_domain(wks_creds), CRED_SPECIFIED); - if (!auth2(cli, wks_creds)) { + if (!auth2(cli, tctx->lp_ctx, wks_creds)) { d_printf("auth2 failed\n"); goto done; } @@ -1381,6 +1382,7 @@ bool torture_samba3_sessionkey(struct torture_context *torture) */ static NTSTATUS pipe_bind_smb(TALLOC_CTX *mem_ctx, + struct loadparm_context *lp_ctx, struct smbcli_tree *tree, const char *pipe_name, const struct ndr_interface_table *iface, @@ -1391,7 +1393,7 @@ static NTSTATUS pipe_bind_smb(TALLOC_CTX *mem_ctx, if (!(result = dcerpc_pipe_init( mem_ctx, tree->session->transport->socket->event.ctx, - lp_iconv_convenience(global_loadparm)))) { + lp_iconv_convenience(lp_ctx)))) { return NT_STATUS_NO_MEMORY; } @@ -1507,7 +1509,9 @@ static struct dom_sid *name2sid(TALLOC_CTX *mem_ctx, * Find out the user SID on this connection */ -static struct dom_sid *whoami(TALLOC_CTX *mem_ctx, struct smbcli_tree *tree) +static struct dom_sid *whoami(TALLOC_CTX *mem_ctx, + struct loadparm_context *lp_ctx, + struct smbcli_tree *tree) { struct dcerpc_pipe *lsa; struct lsa_GetUserName r; @@ -1515,7 +1519,7 @@ static struct dom_sid *whoami(TALLOC_CTX *mem_ctx, struct smbcli_tree *tree) struct lsa_StringPointer authority_name_p; struct dom_sid *result; - status = pipe_bind_smb(mem_ctx, tree, "\\pipe\\lsarpc", + status = pipe_bind_smb(mem_ctx, lp_ctx, tree, "\\pipe\\lsarpc", &ndr_table_lsarpc, &lsa); if (!NT_STATUS_IS_OK(status)) { d_printf("(%s) Could not bind to LSA: %s\n", @@ -1631,7 +1635,7 @@ bool torture_samba3_rpc_getusername(struct torture_context *torture) goto done; } - if (!(user_sid = whoami(mem_ctx, cli->tree))) { + if (!(user_sid = whoami(mem_ctx, torture->lp_ctx, cli->tree))) { d_printf("(%s) whoami on auth'ed connection failed\n", __location__); ret = false; @@ -1658,7 +1662,7 @@ bool torture_samba3_rpc_getusername(struct torture_context *torture) goto done; } - if (!(user_sid = whoami(mem_ctx, cli->tree))) { + if (!(user_sid = whoami(mem_ctx, torture->lp_ctx, cli->tree))) { d_printf("(%s) whoami on anon connection failed\n", __location__); ret = false; @@ -1732,7 +1736,7 @@ bool torture_samba3_rpc_getusername(struct torture_context *torture) goto done; } - if (!(user_sid = whoami(mem_ctx, tree))) { + if (!(user_sid = whoami(mem_ctx, torture->lp_ctx, tree))) { d_printf("(%s) whoami on user connection failed\n", __location__); ret = false; @@ -1870,8 +1874,8 @@ bool torture_samba3_rpc_srvsvc(struct torture_context *torture) return false; } - status = pipe_bind_smb(mem_ctx, cli->tree, "\\pipe\\srvsvc", - &ndr_table_srvsvc, &p); + status = pipe_bind_smb(mem_ctx, torture->lp_ctx, cli->tree, + "\\pipe\\srvsvc", &ndr_table_srvsvc, &p); if (!NT_STATUS_IS_OK(status)) { d_printf("(%s) could not bind to srvsvc pipe: %s\n", __location__, nt_errstr(status)); @@ -2007,6 +2011,7 @@ bool torture_samba3_rpc_randomauth2(struct torture_context *torture) } static struct security_descriptor *get_sharesec(TALLOC_CTX *mem_ctx, + struct loadparm_context *lp_ctx, struct smbcli_session *sess, const char *sharename) { @@ -2028,7 +2033,7 @@ static struct security_descriptor *get_sharesec(TALLOC_CTX *mem_ctx, return NULL; } - status = pipe_bind_smb(mem_ctx, tree, "\\pipe\\srvsvc", + status = pipe_bind_smb(mem_ctx, lp_ctx, tree, "\\pipe\\srvsvc", &ndr_table_srvsvc, &p); if (!NT_STATUS_IS_OK(status)) { d_printf("(%s) could not bind to srvsvc pipe: %s\n", @@ -2060,6 +2065,7 @@ static struct security_descriptor *get_sharesec(TALLOC_CTX *mem_ctx, } static NTSTATUS set_sharesec(TALLOC_CTX *mem_ctx, + struct loadparm_context *lp_ctx, struct smbcli_session *sess, const char *sharename, struct security_descriptor *sd) @@ -2083,7 +2089,7 @@ static NTSTATUS set_sharesec(TALLOC_CTX *mem_ctx, return NT_STATUS_UNSUCCESSFUL; } - status = pipe_bind_smb(mem_ctx, tree, "\\pipe\\srvsvc", + status = pipe_bind_smb(mem_ctx, lp_ctx, tree, "\\pipe\\srvsvc", &ndr_table_srvsvc, &p); if (!NT_STATUS_IS_OK(status)) { d_printf("(%s) could not bind to srvsvc pipe: %s\n", @@ -2115,6 +2121,7 @@ static NTSTATUS set_sharesec(TALLOC_CTX *mem_ctx, } bool try_tcon(TALLOC_CTX *mem_ctx, + struct loadparm_context *lp_ctx, struct security_descriptor *orig_sd, struct smbcli_session *session, const char *sharename, const struct dom_sid *user_sid, @@ -2162,7 +2169,7 @@ bool try_tcon(TALLOC_CTX *mem_ctx, return false; } - status = set_sharesec(mem_ctx, session, sharename, sd); + status = set_sharesec(mem_ctx, lp_ctx, session, sharename, sd); if (!NT_STATUS_IS_OK(status)) { d_printf("custom set_sharesec failed: %s\n", nt_errstr(status)); @@ -2193,7 +2200,7 @@ bool try_tcon(TALLOC_CTX *mem_ctx, done: smbcli_rmdir(rmdir_tree, "sharesec_testdir"); - status = set_sharesec(mem_ctx, session, sharename, orig_sd); + status = set_sharesec(mem_ctx, lp_ctx, session, sharename, orig_sd); if (!NT_STATUS_IS_OK(status)) { d_printf("custom set_sharesec failed: %s\n", nt_errstr(status)); @@ -2225,25 +2232,25 @@ bool torture_samba3_rpc_sharesec(struct torture_context *torture) return false; } - if (!(user_sid = whoami(mem_ctx, cli->tree))) { + if (!(user_sid = whoami(mem_ctx, torture->lp_ctx, cli->tree))) { d_printf("whoami failed\n"); talloc_free(mem_ctx); return false; } - sd = get_sharesec(mem_ctx, cli->session, torture_setting_string(torture, - "share", NULL)); + sd = get_sharesec(mem_ctx, torture->lp_ctx, cli->session, + torture_setting_string(torture, "share", NULL)); - ret &= try_tcon(mem_ctx, sd, cli->session, + ret &= try_tcon(mem_ctx, torture->lp_ctx, sd, cli->session, torture_setting_string(torture, "share", NULL), user_sid, 0, NT_STATUS_ACCESS_DENIED, NT_STATUS_OK); - ret &= try_tcon(mem_ctx, sd, cli->session, + ret &= try_tcon(mem_ctx, torture->lp_ctx, sd, cli->session, torture_setting_string(torture, "share", NULL), user_sid, SEC_FILE_READ_DATA, NT_STATUS_OK, NT_STATUS_MEDIA_WRITE_PROTECTED); - ret &= try_tcon(mem_ctx, sd, cli->session, + ret &= try_tcon(mem_ctx, torture->lp_ctx, sd, cli->session, torture_setting_string(torture, "share", NULL), user_sid, SEC_FILE_ALL, NT_STATUS_OK, NT_STATUS_OK); @@ -2273,7 +2280,7 @@ bool torture_samba3_rpc_lsa(struct torture_context *torture) return false; } - status = pipe_bind_smb(mem_ctx, cli->tree, "\\lsarpc", + status = pipe_bind_smb(mem_ctx, torture->lp_ctx, cli->tree, "\\lsarpc", &ndr_table_lsarpc, &p); if (!NT_STATUS_IS_OK(status)) { d_printf("(%s) pipe_bind_smb failed: %s\n", __location__, @@ -2356,7 +2363,8 @@ static NTSTATUS get_servername(TALLOC_CTX *mem_ctx, struct smbcli_tree *tree, } -static NTSTATUS find_printers(TALLOC_CTX *ctx, struct smbcli_tree *tree, +static NTSTATUS find_printers(TALLOC_CTX *ctx, struct loadparm_context *lp_ctx, + struct smbcli_tree *tree, const char ***printers, int *num_printers) { TALLOC_CTX *mem_ctx; @@ -2372,7 +2380,8 @@ static NTSTATUS find_printers(TALLOC_CTX *ctx, struct smbcli_tree *tree, return NT_STATUS_NO_MEMORY; } - status = pipe_bind_smb(mem_ctx, tree, "\\srvsvc", &ndr_table_srvsvc, + status = pipe_bind_smb(mem_ctx, lp_ctx, + tree, "\\srvsvc", &ndr_table_srvsvc, &p); if (!NT_STATUS_IS_OK(status)) { d_printf("could not bind to srvsvc pipe\n"); @@ -2560,7 +2569,7 @@ bool torture_samba3_rpc_spoolss(struct torture_context *torture) return false; } - if (!NT_STATUS_IS_OK(find_printers(mem_ctx, cli->tree, + if (!NT_STATUS_IS_OK(find_printers(mem_ctx, torture->lp_ctx, cli->tree, &printers, &num_printers))) { talloc_free(mem_ctx); return false; @@ -2572,7 +2581,7 @@ bool torture_samba3_rpc_spoolss(struct torture_context *torture) return true; } - status = pipe_bind_smb(mem_ctx, cli->tree, "\\spoolss", + status = pipe_bind_smb(mem_ctx, torture->lp_ctx, cli->tree, "\\spoolss", &ndr_table_spoolss, &p); if (!NT_STATUS_IS_OK(status)) { d_printf("(%s) pipe_bind_smb failed: %s\n", __location__, @@ -2746,7 +2755,7 @@ bool torture_samba3_rpc_wkssvc(struct torture_context *torture) return false; } - status = pipe_bind_smb(mem_ctx, cli->tree, "\\wkssvc", + status = pipe_bind_smb(mem_ctx, torture->lp_ctx, cli->tree, "\\wkssvc", &ndr_table_wkssvc, &p); if (!NT_STATUS_IS_OK(status)) { d_printf("(%s) pipe_bind_smb failed: %s\n", __location__, @@ -2995,6 +3004,7 @@ bool torture_samba3_rpc_winreg(struct torture_context *torture) } static NTSTATUS get_shareinfo(TALLOC_CTX *mem_ctx, + struct loadparm_context *lp_ctx, struct smbcli_state *cli, const char *share, struct srvsvc_NetShareInfo502 **info) @@ -3006,7 +3016,7 @@ static NTSTATUS get_shareinfo(TALLOC_CTX *mem_ctx, if (!(p = dcerpc_pipe_init(cli, cli->transport->socket->event.ctx, - lp_iconv_convenience(global_loadparm)))) { + lp_iconv_convenience(lp_ctx)))) { status = NT_STATUS_NO_MEMORY; goto fail; } @@ -3176,7 +3186,8 @@ static NTSTATUS torture_samba3_createshare(struct smbcli_state *cli, return status; } -static NTSTATUS torture_samba3_deleteshare(struct smbcli_state *cli, +static NTSTATUS torture_samba3_deleteshare(struct torture_context *torture, + struct smbcli_state *cli, const char *sharename) { struct dcerpc_pipe *p; @@ -3301,7 +3312,7 @@ bool torture_samba3_regconfig(struct torture_context *torture) goto done; } - status = get_shareinfo(torture, cli, "blubber", &i); + status = get_shareinfo(torture, torture->lp_ctx, cli, "blubber", &i); if (!NT_STATUS_IS_OK(status)) { torture_warning(torture, "get_shareinfo failed: " "%s\n", nt_errstr(status)); @@ -3314,7 +3325,7 @@ bool torture_samba3_regconfig(struct torture_context *torture) goto done; } - status = torture_samba3_deleteshare(cli, "blubber"); + status = torture_samba3_deleteshare(torture, cli, "blubber"); if (!NT_STATUS_IS_OK(status)) { torture_warning(torture, "torture_samba3_deleteshare failed: " "%s\n", nt_errstr(status)); -- cgit From 4473a07fb3118b4e5197f05c5b930c3eb828a94a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 19 Feb 2008 11:57:32 +0100 Subject: winreg.idl: get rid of initshutdown_String and use lsa_StringLarge metze (This used to be commit 1ccea2a260de83b2e3137f762716ae67070c7024) --- source4/torture/rpc/winreg.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c index d77295605f..4695733671 100644 --- a/source4/torture/rpc/winreg.c +++ b/source4/torture/rpc/winreg.c @@ -38,12 +38,9 @@ #define TEST_SID "S-1-5-21-1234567890-1234567890-1234567890-500" -static void init_initshutdown_String(TALLOC_CTX *mem_ctx, - struct initshutdown_String *name, - const char *s) +static void init_lsa_StringLarge(struct lsa_StringLarge *name, const char *s) { - name->name = talloc(mem_ctx, struct initshutdown_String_sub); - name->name->name = s; + name->string = s; } static void init_winreg_String(struct winreg_String *name, const char *s) @@ -1636,8 +1633,8 @@ static bool test_InitiateSystemShutdown(struct torture_context *tctx, uint16_t hostname = 0x0; r.in.hostname = &hostname; - r.in.message = talloc(tctx, struct initshutdown_String); - init_initshutdown_String(tctx, r.in.message, "spottyfood"); + r.in.message = talloc(tctx, struct lsa_StringLarge); + init_lsa_StringLarge(r.in.message, "spottyfood"); r.in.force_apps = 1; r.in.timeout = 30; r.in.reboot = 1; @@ -1660,8 +1657,8 @@ static bool test_InitiateSystemShutdownEx(struct torture_context *tctx, uint16_t hostname = 0x0; r.in.hostname = &hostname; - r.in.message = talloc(tctx, struct initshutdown_String); - init_initshutdown_String(tctx, r.in.message, "spottyfood"); + r.in.message = talloc(tctx, struct lsa_StringLarge); + init_lsa_StringLarge(r.in.message, "spottyfood"); r.in.force_apps = 1; r.in.timeout = 30; r.in.reboot = 1; -- cgit From 665a7aafd13aed42a80beaf344dc87f7b753aeea Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 19 Feb 2008 14:58:33 +0100 Subject: initshutdown.idl: get rid of initshutdown_String and use lsa_StringLarge metze (This used to be commit d9303cb08324db5ceb89f69a1a71cc3e16fdf250) --- source4/torture/rpc/initshutdown.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/initshutdown.c b/source4/torture/rpc/initshutdown.c index 9f6f1735ee..92fec5be0c 100644 --- a/source4/torture/rpc/initshutdown.c +++ b/source4/torture/rpc/initshutdown.c @@ -24,10 +24,9 @@ #include "librpc/gen_ndr/ndr_initshutdown_c.h" #include "torture/rpc/rpc.h" -static void init_initshutdown_String(TALLOC_CTX *mem_ctx, struct initshutdown_String *name, const char *s) +static void init_lsa_StringLarge(struct lsa_StringLarge *name, const char *s) { - name->name = talloc(mem_ctx, struct initshutdown_String_sub); - name->name->name = s; + name->string = s; } @@ -58,8 +57,8 @@ static bool test_Init(struct torture_context *tctx, uint16_t hostname = 0x0; r.in.hostname = &hostname; - r.in.message = talloc(tctx, struct initshutdown_String); - init_initshutdown_String(tctx, r.in.message, "spottyfood"); + r.in.message = talloc(tctx, struct lsa_StringLarge); + init_lsa_StringLarge(r.in.message, "spottyfood"); r.in.force_apps = 1; r.in.timeout = 30; r.in.reboot = 1; @@ -80,8 +79,8 @@ static bool test_InitEx(struct torture_context *tctx, uint16_t hostname = 0x0; r.in.hostname = &hostname; - r.in.message = talloc(tctx, struct initshutdown_String); - init_initshutdown_String(tctx, r.in.message, "spottyfood"); + r.in.message = talloc(tctx, struct lsa_StringLarge); + init_lsa_StringLarge(r.in.message, "spottyfood"); r.in.force_apps = 1; r.in.timeout = 30; r.in.reboot = 1; -- cgit