Changeset 165 for branches/samba-3.0/source/rpc_parse
- Timestamp:
- Mar 11, 2009, 9:14:55 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/rpc_parse/parse_net.c
r134 r165 997 997 } 998 998 999 /******************************************************************* 1000 Inits a NET_Q_SRV_PWSET2. 1001 ********************************************************************/ 1002 1003 void init_q_srv_pwset2(NET_Q_SRV_PWSET2 *q_s, 1004 const char *logon_srv, 1005 const char *sess_key, 1006 const char *acct_name, 1007 uint16 sec_chan, 1008 const char *comp_name, 1009 DOM_CRED *cred, 1010 const char *clear_text_mach_pwd) 1011 { 1012 uint8_t password_buf[516]; 1013 NET_CRYPT_PWD new_password; 1014 1015 DEBUG(5,("init_q_srv_pwset2\n")); 1016 1017 /* Process the new password. */ 1018 1019 encode_pw_buffer(password_buf, clear_text_mach_pwd, STR_UNICODE); 1020 1021 SamOEMhash(password_buf, (const unsigned char *)sess_key, 516); 1022 memcpy(new_password.data, password_buf, 512); 1023 new_password.length = IVAL(password_buf, 512); 1024 1025 init_clnt_info(&q_s->clnt_id, logon_srv, acct_name, sec_chan, comp_name, cred); 1026 1027 memcpy(&q_s->pwd, &new_password, sizeof(q_s->pwd)); 1028 } 1029 1030 /******************************************************************* 1031 Reads or writes a structure. 1032 ********************************************************************/ 1033 1034 BOOL net_io_q_srv_pwset2(const char *desc, NET_Q_SRV_PWSET2 *q_s, prs_struct *ps, int depth) 1035 { 1036 if (q_s == NULL) 1037 return False; 1038 1039 prs_debug(ps, depth, desc, "net_io_q_srv_pwset2"); 1040 depth++; 1041 1042 if(!prs_align(ps)) 1043 return False; 1044 1045 if(!smb_io_clnt_info("", &q_s->clnt_id, ps, depth)) /* client identification/authentication info */ 1046 return False; 1047 if(!prs_uint8s(False, "pwd.data", ps, depth, q_s->pwd.data, 512)) /* new password - undocumented */ 1048 return False; 1049 if(!prs_uint32("pwd.length", ps, depth, &q_s->pwd.length)) /* new password - undocumented */ 1050 return False; 1051 1052 return True; 1053 } 1054 1055 /******************************************************************* 1056 Reads or writes a structure. 1057 ********************************************************************/ 1058 1059 BOOL net_io_r_srv_pwset2(const char *desc, NET_R_SRV_PWSET2 *r_s, prs_struct *ps, int depth) 1060 { 1061 if (r_s == NULL) 1062 return False; 1063 1064 prs_debug(ps, depth, desc, "net_io_r_srv_pwset2"); 1065 depth++; 1066 1067 if(!prs_align(ps)) 1068 return False; 1069 1070 if(!smb_io_cred("", &r_s->srv_cred, ps, depth)) /* server challenge */ 1071 return False; 1072 1073 if(!prs_ntstatus("status", ps, depth, &r_s->status)) 1074 return False; 1075 1076 return True; 1077 } 1078 999 1079 /************************************************************************* 1000 1080 Init DOM_SID2 array from a string containing multiple sids
Note:
See TracChangeset
for help on using the changeset viewer.