Changeset 165 for branches/samba-3.0/source/rpc_client
- Timestamp:
- Mar 11, 2009, 9:14:55 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/rpc_client/cli_netlogon.c
r140 r165 1083 1083 return result; 1084 1084 } 1085 1086 /*************************************************************************** 1087 LSA Server Password Set2. 1088 ****************************************************************************/ 1089 1090 NTSTATUS rpccli_net_srv_pwset2(struct rpc_pipe_client *cli, 1091 TALLOC_CTX *mem_ctx, 1092 const char *machine_name, 1093 const char *clear_text_mach_pwd) 1094 { 1095 prs_struct rbuf; 1096 prs_struct qbuf; 1097 DOM_CRED clnt_creds; 1098 NET_Q_SRV_PWSET2 q; 1099 NET_R_SRV_PWSET2 r; 1100 uint16 sec_chan_type = 2; 1101 NTSTATUS result; 1102 1103 creds_client_step(cli->dc, &clnt_creds); 1104 1105 DEBUG(4,("cli_net_srv_pwset2: srv:%s acct:%s sc: %d mc: %s\n", 1106 cli->dc->remote_machine, cli->dc->mach_acct, sec_chan_type, machine_name)); 1107 1108 /* store the parameters */ 1109 init_q_srv_pwset2(&q, cli->dc->remote_machine, (const char *)cli->dc->sess_key, 1110 cli->dc->mach_acct, sec_chan_type, machine_name, 1111 &clnt_creds, clear_text_mach_pwd); 1112 1113 CLI_DO_RPC(cli, mem_ctx, PI_NETLOGON, NET_SRVPWSET2, 1114 q, r, 1115 qbuf, rbuf, 1116 net_io_q_srv_pwset2, 1117 net_io_r_srv_pwset2, 1118 NT_STATUS_UNSUCCESSFUL); 1119 1120 result = r.status; 1121 1122 if (!NT_STATUS_IS_OK(result)) { 1123 /* report error code */ 1124 DEBUG(0,("cli_net_srv_pwset2: %s\n", nt_errstr(result))); 1125 } 1126 1127 /* Always check returned credentials. */ 1128 if (!creds_client_check(cli->dc, &r.srv_cred.challenge)) { 1129 DEBUG(0,("rpccli_net_srv_pwset2: credentials chain check failed\n")); 1130 return NT_STATUS_ACCESS_DENIED; 1131 } 1132 1133 return result; 1134 }
Note:
See TracChangeset
for help on using the changeset viewer.