summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_netlogon.c2
-rw-r--r--source3/rpcclient/cmd_samr.c21
-rw-r--r--source3/rpcclient/cmd_spoolss.c23
-rw-r--r--source3/rpcclient/rpcclient.c2
4 files changed, 21 insertions, 27 deletions
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/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;
}
}
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 48f9df3cac..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: {
@@ -723,18 +721,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;
+ 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<num_values; i++) {
+ for (i=0; values[i] != NULL; i++) {
d_printf("%s\n", values[i]);
}
TALLOC_FREE(values);
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;