Ignore:
Timestamp:
Sep 30, 2007, 3:42:50 AM (18 years ago)
Author:
Paul Smedley
Message:

Update trunk to 3.2.0pre1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/samba/source/utils/ntlm_auth.c

    r22 r77  
    1111   This program is free software; you can redistribute it and/or modify
    1212   it under the terms of the GNU General Public License as published by
    13    the Free Software Foundation; either version 2 of the License, or
     13   the Free Software Foundation; either version 3 of the License, or
    1414   (at your option) any later version.
    1515   
     
    2020   
    2121   You should have received a copy of the GNU General Public License
    22    along with this program; if not, write to the Free Software
    23    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     22   along with this program.  If not, see <http://www.gnu.org/licenses/>.
    2423*/
    2524
     
    365364                if (error_string)
    366365                        *error_string = smb_xstrdup("Reading winbind reply failed!");
    367                 free_response(&response);
     366                winbindd_free_response(&response);
    368367                return nt_status;
    369368        }
     
    373372                if (error_string)
    374373                        *error_string = smb_xstrdup(response.data.auth.error_string);
    375                 free_response(&response);
     374                winbindd_free_response(&response);
    376375                return nt_status;
    377376        }
     
    389388                *unix_name = SMB_STRDUP((char *)response.extra_data.data);
    390389                if (!*unix_name) {
    391                         free_response(&response);
     390                        winbindd_free_response(&response);
    392391                        return NT_STATUS_NO_MEMORY;
    393392                }
    394393        }
    395394
    396         free_response(&response);
     395        winbindd_free_response(&response);
    397396        return nt_status;
    398397}
     
    460459                if (error_string)
    461460                        *error_string = smb_xstrdup("Reading winbind reply failed!");
    462                 free_response(&response);
     461                winbindd_free_response(&response);
    463462                return nt_status;
    464463        }
     
    469468                if (error_string)
    470469                        *error_string = smb_xstrdup(response.data.auth.error_string);
    471                 free_response(&response);
     470                winbindd_free_response(&response);
    472471                return nt_status;
    473472        }
    474473
    475         free_response(&response);
     474        winbindd_free_response(&response);
    476475       
    477476    return nt_status;
     
    660659
    661660        if (result != NSS_STATUS_SUCCESS) {
    662                 free_response(&wb_response);
     661                winbindd_free_response(&wb_response);
    663662                return NT_STATUS_UNSUCCESSFUL;
    664663        }
     
    669668                if (wb_response.data.ccache_ntlm_auth.auth_blob_len > 0 &&
    670669                                reply->data == NULL) {
    671                         free_response(&wb_response);
     670                        winbindd_free_response(&wb_response);
    672671                        return NT_STATUS_NO_MEMORY;
    673672                }
    674673        }
    675674
    676         free_response(&wb_response);
     675        winbindd_free_response(&wb_response);
    677676        return NT_STATUS_MORE_PROCESSING_REQUIRED;
    678677}
     
    705704                request = base64_decode_data_blob(buf + 3);
    706705        } else {
    707                 request = data_blob(NULL, 0);
     706                request = data_blob_null;
    708707        }
    709708
     
    762761
    763762        DEBUG(10, ("got NTLMSSP packet:\n"));
    764         dump_data(10, (const char *)request.data, request.length);
     763        dump_data(10, request.data, request.length);
    765764
    766765        nt_status = ntlmssp_update(ntlmssp_state, request, &reply);
     
    833832                request = base64_decode_data_blob(buf + 3);
    834833        } else {
    835                 request = data_blob(NULL, 0);
     834                request = data_blob_null;
    836835        }
    837836
     
    855854        if (!ntlmssp_state && use_cached_creds) {
    856855                /* check whether credentials are usable. */
    857                 DATA_BLOB empty_blob = data_blob(NULL, 0);
     856                DATA_BLOB empty_blob = data_blob_null;
    858857
    859858                nt_status = do_ccache_ntlm_auth(empty_blob, empty_blob, NULL);
     
    911910                ntlmssp_want_feature_list(ntlmssp_state, want_feature_list);
    912911                first = True;
    913                 initial_message = data_blob(NULL, 0);
     912                initial_message = data_blob_null;
    914913        }
    915914
    916915        DEBUG(10, ("got NTLMSSP packet:\n"));
    917         dump_data(10, (const char *)request.data, request.length);
     916        dump_data(10, request.data, request.length);
    918917
    919918        if (use_cached_creds && !opt_password && !first) {
     
    11361135
    11371136                        DEBUG(10, ("got NTLMSSP packet:\n"));
    1138                         dump_data(10, (const char *)request.negTokenInit.mechToken.data,
     1137                        dump_data(10, request.negTokenInit.mechToken.data,
    11391138                                  request.negTokenInit.mechToken.length);
    11401139
    11411140                        response.type = SPNEGO_NEG_TOKEN_TARG;
    11421141                        response.negTokenTarg.supportedMech = SMB_STRDUP(OID_NTLMSSP);
    1143                         response.negTokenTarg.mechListMIC = data_blob(NULL, 0);
     1142                        response.negTokenTarg.mechListMIC = data_blob_null;
    11441143
    11451144                        status = ntlmssp_update(ntlmssp_state,
     
    11641163                        response.type = SPNEGO_NEG_TOKEN_TARG;
    11651164                        response.negTokenTarg.supportedMech = SMB_STRDUP(OID_KERBEROS5_OLD);
    1166                         response.negTokenTarg.mechListMIC = data_blob(NULL, 0);
    1167                         response.negTokenTarg.responseToken = data_blob(NULL, 0);
     1165                        response.negTokenTarg.mechListMIC = data_blob_null;
     1166                        response.negTokenTarg.responseToken = data_blob_null;
    11681167
    11691168                        status = ads_verify_ticket(mem_ctx, lp_realm(), 0,
    11701169                                                   &request.negTokenInit.mechToken,
    11711170                                                   &principal, NULL, &ap_rep,
    1172                                                    &session_key);
     1171                                                   &session_key, True);
    11731172
    11741173                        talloc_destroy(mem_ctx);
     
    12231222                response.type = SPNEGO_NEG_TOKEN_TARG;
    12241223                response.negTokenTarg.supportedMech = SMB_STRDUP(OID_NTLMSSP);
    1225                 response.negTokenTarg.mechListMIC = data_blob(NULL, 0);
     1224                response.negTokenTarg.mechListMIC = data_blob_null;
    12261225
    12271226                if (NT_STATUS_IS_OK(status)) {
     
    12771276{
    12781277        NTSTATUS status;
    1279         DATA_BLOB null_blob = data_blob(NULL, 0);
     1278        DATA_BLOB null_blob = data_blob_null;
    12801279        DATA_BLOB to_server;
    12811280        char *to_server_base64;
     
    13381337{
    13391338        NTSTATUS status;
    1340         DATA_BLOB null_blob = data_blob(NULL, 0);
     1339        DATA_BLOB null_blob = data_blob_null;
    13411340        DATA_BLOB request;
    13421341        DATA_BLOB to_server;
     
    13991398        char *principal;
    14001399        DATA_BLOB tkt, to_server;
    1401         DATA_BLOB session_key_krb5 = data_blob(NULL, 0);
     1400        DATA_BLOB session_key_krb5 = data_blob_null;
    14021401        SPNEGO_DATA reply;
    14031402        char *reply_base64;
     
    14631462        reply.negTokenInit.reqFlags = 0;
    14641463        reply.negTokenInit.mechToken = tkt;
    1465         reply.negTokenInit.mechListMIC = data_blob(NULL, 0);
     1464        reply.negTokenInit.mechListMIC = data_blob_null;
    14661465
    14671466        len = write_spnego_data(&to_server, &reply);
     
    17521751                }
    17531752                /* clear out the state */
    1754                 challenge = data_blob(NULL, 0);
    1755                 nt_response = data_blob(NULL, 0);
    1756                 lm_response = data_blob(NULL, 0);
     1753                challenge = data_blob_null;
     1754                nt_response = data_blob_null;
     1755                lm_response = data_blob_null;
    17571756                SAFE_FREE(full_username);
    17581757                SAFE_FREE(username);
     
    18011800                                  parameter,
    18021801                                  (int)challenge.length);
    1803                         challenge = data_blob(NULL, 0);
     1802                        challenge = data_blob_null;
    18041803                }
    18051804        } else if (strequal(request, "NT-Response")) {
     
    18091808                                  parameter,
    18101809                                  (int)nt_response.length);
    1811                         nt_response = data_blob(NULL, 0);
     1810                        nt_response = data_blob_null;
    18121811                }
    18131812        } else if (strequal(request, "LANMAN-Response")) {
     
    18171816                                  parameter,
    18181817                                  (int)lm_response.length);
    1819                         lm_response = data_blob(NULL, 0);
     1818                        lm_response = data_blob_null;
    18201819                }
    18211820        } else if (strequal(request, "Password")) {
     
    19511950                }
    19521951                /* clear out the state */
    1953                 new_nt_pswd = data_blob(NULL, 0);
    1954                 old_nt_hash_enc = data_blob(NULL, 0);
    1955                 new_lm_pswd = data_blob(NULL, 0);
    1956                 old_nt_hash_enc = data_blob(NULL, 0);
     1952                new_nt_pswd = data_blob_null;
     1953                old_nt_hash_enc = data_blob_null;
     1954                new_lm_pswd = data_blob_null;
     1955                old_nt_hash_enc = data_blob_null;
    19571956                SAFE_FREE(full_username);
    19581957                SAFE_FREE(username);
     
    20001999                                  parameter,
    20012000                                  (int)new_nt_pswd.length);
    2002                         new_nt_pswd = data_blob(NULL, 0);
     2001                        new_nt_pswd = data_blob_null;
    20032002                }
    20042003        } else if (strequal(request, "old-nt-hash-blob")) {
     
    20092008                                  parameter,
    20102009                                  (int)old_nt_hash_enc.length);
    2011                         old_nt_hash_enc = data_blob(NULL, 0);
     2010                        old_nt_hash_enc = data_blob_null;
    20122011                }
    20132012        } else if (strequal(request, "new-lm-password-blob")) {
     
    20182017                                  parameter,
    20192018                                  (int)new_lm_pswd.length);
    2020                         new_lm_pswd = data_blob(NULL, 0);
     2019                        new_lm_pswd = data_blob_null;
    20212020                }
    20222021        }
     
    20292028                                  parameter,
    20302029                                  (int)old_lm_hash_enc.length);
    2031                         old_lm_hash_enc = data_blob(NULL, 0);
     2030                        old_lm_hash_enc = data_blob_null;
    20322031                }
    20332032        } else if (strequal(request, "nt-domain")) {
Note: See TracChangeset for help on using the changeset viewer.