diff options
author | Jeremy Allison <jra@samba.org> | 2009-10-17 10:36:33 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-10-17 10:36:33 -0700 |
commit | 7c51fa6d699a653cafa90df8e44911b576118ebd (patch) | |
tree | 543bf9ca698e03eff81104898b33e77f1abed319 /source3/rpcclient | |
parent | cc3a6770c77ec8fe1cd63bf4c682853c56201f0c (diff) | |
parent | 3e3214fd91471bca5b6c4d3782e922d252d588fb (diff) | |
download | samba-7c51fa6d699a653cafa90df8e44911b576118ebd.tar.gz samba-7c51fa6d699a653cafa90df8e44911b576118ebd.tar.bz2 samba-7c51fa6d699a653cafa90df8e44911b576118ebd.zip |
Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/cmd_netlogon.c | 2 | ||||
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 21 | ||||
-rw-r--r-- | source3/rpcclient/cmd_spoolss.c | 23 | ||||
-rw-r--r-- | source3/rpcclient/rpcclient.c | 2 |
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; |