Changeset 596 for trunk/server/source3/libsmb
- Timestamp:
- Jul 2, 2011, 3:35:33 PM (14 years ago)
- Location:
- trunk/server/source3/libsmb
- Files:
-
- 5 edited
-
async_smb.c (modified) (2 diffs)
-
clidgram.c (modified) (9 diffs)
-
clikrb5.c (modified) (4 diffs)
-
clireadwrite.c (modified) (3 diffs)
-
nmblib.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/source3/libsmb/async_smb.c
r414 r596 706 706 TALLOC_FREE(inbuf); 707 707 status = NT_STATUS_ACCESS_DENIED; 708 709 708 710 goto fail; 709 711 } … … 1070 1072 return NT_STATUS_OK; 1071 1073 } 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 -
trunk/server/source3/libsmb/clidgram.c
r414 r596 239 239 if (blob.length < 4) { 240 240 DEBUG(0,("invalid length: %d\n", (int)blob.length)); 241 241 242 return false; 242 243 } … … 244 245 if (RIVAL(blob.data,0) != DGRAM_SMB) { 245 246 DEBUG(0,("invalid packet\n")); 247 246 248 return false; 247 249 } … … 254 256 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { 255 257 DEBUG(0,("failed to parse packet\n")); 258 256 259 return false; 257 260 } … … 259 262 if (p.smb.smb_command != SMB_TRANSACTION) { 260 263 DEBUG(0,("invalid smb_command: %d\n", p.smb.smb_command)); 264 261 265 return false; 262 266 } … … 272 276 status = pull_netlogon_samlogon_response(&blob, mem_ctx, NULL, &r); 273 277 if (!NT_STATUS_IS_OK(status)) { 278 274 279 return false; 275 280 } … … 286 291 DEBUG(3, ("GetDC: Expected domain %s, got %s\n", 287 292 domain_name, returned_domain)); 293 288 294 return false; 289 295 } … … 291 297 *dc_name = talloc_strdup(mem_ctx, returned_dc); 292 298 if (!*dc_name) { 299 293 300 return false; 294 301 } … … 301 308 mem_ctx, &r, sizeof(struct netlogon_samlogon_response)); 302 309 if (!*_r) { 310 303 311 return false; 304 312 } … … 308 316 *dc_name, returned_domain)); 309 317 318 310 319 return True; 311 320 } -
trunk/server/source3/libsmb/clikrb5.c
r590 r596 697 697 SIVAL(gss_cksum, 0, GSSAPI_BNDLENGTH); 698 698 699 /* Precalculated MD5sum of NULL channel bindings (20 bytes) */ 700 /* Channel bindings are: (all ints encoded as little endian) 701 702 [4 bytes] initiator_addrtype (255 for null bindings) 703 [4 bytes] initiator_address length 704 [n bytes] .. initiator_address data - not present 705 in null bindings. 706 [4 bytes] acceptor_addrtype (255 for null bindings) 707 [4 bytes] acceptor_address length 708 [n bytes] .. acceptor_address data - not present 709 in null bindings. 710 [4 bytes] application_data length 711 [n bytes] .. application_ data - not present 712 in null bindings. 713 MD5 of this is ""\x14\x8f\x0c\xf7\xb1u\xdey*J\x9a%\xdfV\xc5\x18" 714 */ 715 716 memcpy(&gss_cksum[4], 717 "\x14\x8f\x0c\xf7\xb1u\xdey*J\x9a%\xdfV\xc5\x18", 718 GSSAPI_BNDLENGTH); 699 /* 700 * GSS_C_NO_CHANNEL_BINDINGS means 16 zero bytes. 701 * This matches the behavior of heimdal and mit. 702 * 703 * And it is needed to work against some closed source 704 * SMB servers. 705 * 706 * See bug #7883 707 */ 708 memset(&gss_cksum[4], 0x00, GSSAPI_BNDLENGTH); 719 709 720 710 SIVAL(gss_cksum, 20, gss_flags); … … 833 823 } 834 824 835 #if defined(TKT_FLG_OK_AS_DELEGATE ) && defined(HAVE_KRB5_FWD_TGT_CREDS) && defined(HAVE_KRB5_AUTH_CON_SETUSERUSERKEY) && defined(KRB5_AUTH_CONTEXT_USE_SUBKEY) 825 #if defined(TKT_FLG_OK_AS_DELEGATE ) && defined(HAVE_KRB5_FWD_TGT_CREDS) && defined(HAVE_KRB5_AUTH_CON_SETUSERUSERKEY) && defined(KRB5_AUTH_CONTEXT_USE_SUBKEY) 836 826 if( credsp->ticket_flags & TKT_FLG_OK_AS_DELEGATE ) { 837 827 /* Fetch a forwarded TGT from the KDC so that we can hand off a 2nd ticket … … 895 885 } 896 886 } 897 #endif898 887 899 888 /* Frees and reallocates in_data into a GSS checksum blob. */ … … 903 892 } 904 893 905 #if defined(HAVE_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE)906 894 /* We always want GSS-checksum types. */ 907 895 retval = krb5_auth_con_set_req_cksumtype(context, *auth_context, GSSAPI_CHECKSUM ); -
trunk/server/source3/libsmb/clireadwrite.c
r414 r596 705 705 uint16 mode, 706 706 const char *buf, 707 size_t size, 708 int i) 707 size_t size) 709 708 { 710 709 char *p; … … 780 779 } 781 780 782 SSVAL(cli->outbuf,smb_mid,cli->mid + i);783 784 781 show_msg(cli->outbuf); 785 782 if (direct_writes) { … … 830 827 write_mode, 831 828 buf + bsent, 832 size1 , issued))829 size1)) 833 830 return -1; 834 831 issued++; -
trunk/server/source3/libsmb/nmblib.c
r593 r596 1294 1294 ****************************************************************************/ 1295 1295 1296 char *name_mangle(TALLOC_CTX *mem_ctx, c har *In, char name_type)1296 char *name_mangle(TALLOC_CTX *mem_ctx, char *In, char name_type) 1297 1297 { 1298 1298 int i;
Note:
See TracChangeset
for help on using the changeset viewer.
