From b0a66496f571cd7003292a7c8fe0e072df18a0a2 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 29 Sep 2009 23:22:46 +0200 Subject: s3: use pull_reg_multi_sz in rpcclient and net. Guenther --- source3/rpcclient/cmd_spoolss.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'source3/rpcclient') diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 48f9df3cac..6a525514a4 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -723,18 +723,17 @@ static void display_reg_value(struct regval_blob value) break; } case REG_MULTI_SZ: { - uint32_t i, num_values; - char **values; + uint32_t i; + const char **values; + DATA_BLOB blob = data_blob_const(value.data_p, value.size); - if (!W_ERROR_IS_OK(reg_pull_multi_sz(NULL, value.data_p, - value.size, &num_values, - &values))) { - d_printf("reg_pull_multi_sz failed\n"); + if (!pull_reg_multi_sz(NULL, &blob, &values)) { + d_printf("pull_reg_multi_sz failed\n"); break; } printf("%s: REG_MULTI_SZ: \n", value.valuename); - for (i=0; i Date: Wed, 30 Sep 2009 20:00:52 +0200 Subject: s3-registry: use pull_reg_sz() where appropriate. (and move away from rpcstr_pull and rpcstr_pull_talloc). Guenther --- source3/rpcclient/cmd_spoolss.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'source3/rpcclient') diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 6a525514a4..8b1a6eac03 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -689,7 +689,8 @@ static WERROR cmd_spoolss_getprinter(struct rpc_pipe_client *cli, static void display_reg_value(struct regval_blob value) { - char *text = NULL; + const char *text = NULL; + DATA_BLOB blob; switch(value.type) { case REG_DWORD: @@ -697,11 +698,8 @@ static void display_reg_value(struct regval_blob value) *((uint32_t *) value.data_p)); break; case REG_SZ: - rpcstr_pull_talloc(talloc_tos(), - &text, - value.data_p, - value.size, - STR_TERMINATE); + blob = data_blob_const(value.data_p, value.size); + pull_reg_sz(talloc_tos(), &blob, &text); printf("%s: REG_SZ: %s\n", value.valuename, text ? text : ""); break; case REG_BINARY: { @@ -725,7 +723,7 @@ static void display_reg_value(struct regval_blob value) case REG_MULTI_SZ: { uint32_t i; const char **values; - DATA_BLOB blob = data_blob_const(value.data_p, value.size); + blob = data_blob_const(value.data_p, value.size); if (!pull_reg_multi_sz(NULL, &blob, &values)) { d_printf("pull_reg_multi_sz failed\n"); -- cgit From 607ceff234c5c85849975087e9a40416b943c269 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Fri, 25 Sep 2009 22:44:00 +0200 Subject: s3/s4 - Adapt the IDL changes on various locations --- source3/rpcclient/cmd_samr.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'source3/rpcclient') diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index 699b54d364..e52411f8f7 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -2538,7 +2538,7 @@ static NTSTATUS cmd_samr_chgpasswd3(struct rpc_pipe_client *cli, const char *user, *oldpass, *newpass; uint32 access_mask = MAXIMUM_ALLOWED_ACCESS; struct samr_DomInfo1 *info = NULL; - struct samr_ChangeReject *reject = NULL; + struct userPwdChangeFailureInformation *reject = NULL; if (argc < 3) { printf("Usage: %s username oldpass newpass\n", argv[0]); @@ -2581,22 +2581,19 @@ static NTSTATUS cmd_samr_chgpasswd3(struct rpc_pipe_client *cli, display_sam_dom_info_1(info); - switch (reject->reason) { - case SAMR_REJECT_TOO_SHORT: - d_printf("SAMR_REJECT_TOO_SHORT\n"); + switch (reject->extendedFailureReason) { + case SAM_PWD_CHANGE_PASSWORD_TOO_SHORT: + d_printf("SAM_PWD_CHANGE_PASSWORD_TOO_SHORT\n"); break; - case SAMR_REJECT_IN_HISTORY: - d_printf("SAMR_REJECT_IN_HISTORY\n"); + case SAM_PWD_CHANGE_PWD_IN_HISTORY: + d_printf("SAM_PWD_CHANGE_PWD_IN_HISTORY\n"); break; - case SAMR_REJECT_COMPLEXITY: - d_printf("SAMR_REJECT_COMPLEXITY\n"); - break; - case SAMR_REJECT_OTHER: - d_printf("SAMR_REJECT_OTHER\n"); + case SAM_PWD_CHANGE_NOT_COMPLEX: + d_printf("SAM_PWD_CHANGE_NOT_COMPLEX\n"); break; default: d_printf("unknown reject reason: %d\n", - reject->reason); + reject->extendedFailureReason); break; } } -- cgit From ebe0e64ba9815b238cccf7d24821bc473d245707 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 13 Oct 2009 10:15:34 +0200 Subject: s3: use enum netr_SchannelType all over the place. Guenther --- source3/rpcclient/cmd_netlogon.c | 2 +- source3/rpcclient/rpcclient.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/rpcclient') diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c index ae76652113..2fbadf2a75 100644 --- a/source3/rpcclient/cmd_netlogon.c +++ b/source3/rpcclient/cmd_netlogon.c @@ -1051,7 +1051,7 @@ static NTSTATUS cmd_netlogon_database_redo(struct rpc_pipe_client *cli, struct netr_Authenticator clnt_creds, srv_cred; struct netr_DELTA_ENUM_ARRAY *delta_enum_array = NULL; unsigned char trust_passwd_hash[16]; - uint32_t sec_channel_type = 0; + enum netr_SchannelType sec_channel_type = 0; struct netr_ChangeLogEntry e; uint32_t rid = 500; diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 7a20e487f2..20ea8a05e7 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -694,7 +694,7 @@ static NTSTATUS do_cmd(struct cli_state *cli, if (ndr_syntax_id_equal(cmd_entry->interface, &ndr_table_netlogon.syntax_id)) { uint32_t neg_flags = NETLOGON_NEG_AUTH2_ADS_FLAGS; - uint32 sec_channel_type; + enum netr_SchannelType sec_channel_type; uchar trust_password[16]; const char *machine_account; -- cgit