Ignore:
Timestamp:
Jul 2, 2011, 3:35:33 PM (14 years ago)
Author:
Herwig Bauernfeind
Message:

Samba 3.5: Update trunk to 3.5.8

Location:
trunk/server/source3/libsmb
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/source3/libsmb/async_smb.c

    r414 r596  
    706706                TALLOC_FREE(inbuf);
    707707                status = NT_STATUS_ACCESS_DENIED;
     708
     709
    708710                goto fail;
    709711        }
     
    10701072        return NT_STATUS_OK;
    10711073}
     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  
    239239        if (blob.length < 4) {
    240240                DEBUG(0,("invalid length: %d\n", (int)blob.length));
     241
    241242                return false;
    242243        }
     
    244245        if (RIVAL(blob.data,0) != DGRAM_SMB) {
    245246                DEBUG(0,("invalid packet\n"));
     247
    246248                return false;
    247249        }
     
    254256        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    255257                DEBUG(0,("failed to parse packet\n"));
     258
    256259                return false;
    257260        }
     
    259262        if (p.smb.smb_command != SMB_TRANSACTION) {
    260263                DEBUG(0,("invalid smb_command: %d\n", p.smb.smb_command));
     264
    261265                return false;
    262266        }
     
    272276        status = pull_netlogon_samlogon_response(&blob, mem_ctx, NULL, &r);
    273277        if (!NT_STATUS_IS_OK(status)) {
     278
    274279                return false;
    275280        }
     
    286291                DEBUG(3, ("GetDC: Expected domain %s, got %s\n",
    287292                          domain_name, returned_domain));
     293
    288294                return false;
    289295        }
     
    291297        *dc_name = talloc_strdup(mem_ctx, returned_dc);
    292298        if (!*dc_name) {
     299
    293300                return false;
    294301        }
     
    301308                        mem_ctx, &r, sizeof(struct netlogon_samlogon_response));
    302309                if (!*_r) {
     310
    303311                        return false;
    304312                }
     
    308316                   *dc_name, returned_domain));
    309317
     318
    310319        return True;
    311320}
  • trunk/server/source3/libsmb/clikrb5.c

    r590 r596  
    697697        SIVAL(gss_cksum, 0, GSSAPI_BNDLENGTH);
    698698
    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);
    719709
    720710        SIVAL(gss_cksum, 20, gss_flags);
     
    833823        }
    834824
    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)
    836826        if( credsp->ticket_flags & TKT_FLG_OK_AS_DELEGATE ) {
    837827                /* Fetch a forwarded TGT from the KDC so that we can hand off a 2nd ticket
     
    895885                }
    896886        }
    897 #endif
    898887
    899888        /* Frees and reallocates in_data into a GSS checksum blob. */
     
    903892        }
    904893
    905 #if defined(HAVE_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE)
    906894        /* We always want GSS-checksum types. */
    907895        retval = krb5_auth_con_set_req_cksumtype(context, *auth_context, GSSAPI_CHECKSUM );
  • trunk/server/source3/libsmb/clireadwrite.c

    r414 r596  
    705705                                uint16 mode,
    706706                                const char *buf,
    707                                 size_t size,
    708                                 int i)
     707                                size_t size)
    709708{
    710709        char *p;
     
    780779        }
    781780
    782         SSVAL(cli->outbuf,smb_mid,cli->mid + i);
    783 
    784781        show_msg(cli->outbuf);
    785782        if (direct_writes) {
     
    830827                                        write_mode,
    831828                                        buf + bsent,
    832                                         size1, issued))
     829                                        size1))
    833830                                return -1;
    834831                        issued++;
  • trunk/server/source3/libsmb/nmblib.c

    r593 r596  
    12941294****************************************************************************/
    12951295
    1296 char *name_mangle(TALLOC_CTX *mem_ctx, char *In, char name_type)
     1296char *name_mangle(TALLOC_CTX *mem_ctx, char *In, char name_type)
    12971297{
    12981298        int   i;
Note: See TracChangeset for help on using the changeset viewer.