Ignore:
Timestamp:
Nov 27, 2012, 4:56:06 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated vendor to 3.6.9

Location:
vendor/current/libcli/auth
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/libcli/auth/credentials.c

    r740 r746  
    7070        unsigned char zero[4], tmp[16];
    7171        HMACMD5Context ctx;
    72         struct MD5Context md5;
     72        MD5_CTX md5;
    7373
    7474        ZERO_STRUCT(creds->session_key);
  • vendor/current/libcli/auth/ntlm_check.c

    r740 r746  
    8888                                 const DATA_BLOB *sec_blob,
    8989                                 const char *user, const char *domain,
    90                                  bool upper_case_domain, /* should the domain be transformed into upper case? */
    9190                                 DATA_BLOB *user_sess_key)
    9291{
     
    123122        */
    124123
    125         if (!ntv2_owf_gen(part_passwd, user, domain, upper_case_domain, kr)) {
     124        if (!ntv2_owf_gen(part_passwd, user, domain, kr)) {
    126125                return false;
    127126        }
     
    162161                                const DATA_BLOB *sec_blob,
    163162                                const char *user, const char *domain,
    164                                 bool upper_case_domain, /* should the domain be transformed into upper case? */
    165163                                DATA_BLOB *user_sess_key)
    166164{
     
    193191        client_key_data = data_blob_talloc(mem_ctx, ntv2_response->data+16, ntv2_response->length-16);
    194192
    195         if (!ntv2_owf_gen(part_passwd, user, domain, upper_case_domain, kr)) {
     193        if (!ntv2_owf_gen(part_passwd, user, domain, kr)) {
    196194                return false;
    197195        }
     
    298296        const static uint8_t zeros[8];
    299297        DATA_BLOB tmp_sess_key;
     298        const char *upper_client_domain = NULL;
     299
     300        if (client_domain != NULL) {
     301                upper_client_domain = talloc_strdup_upper(mem_ctx, client_domain);
     302                if (upper_client_domain == NULL) {
     303                        return NT_STATUS_NO_MEMORY;
     304                }
     305        }
    300306
    301307        if (stored_nt == NULL) {
     
    349355                   use it
    350356                */
    351                 DEBUG(4,("ntlm_password_check: Checking NTLMv2 password with domain [%s]\n", client_domain));
     357                DEBUG(4,("ntlm_password_check: Checking NTLMv2 password with domain [%s]\n",
     358                        client_domain ? client_domain : "<NULL>"));
    352359                if (smb_pwd_check_ntlmv2(mem_ctx,
    353360                                         nt_response,
     
    355362                                         client_username,
    356363                                         client_domain,
    357                                          false,
    358364                                         user_sess_key)) {
    359365                        if (user_sess_key->length) {
     
    363369                }
    364370
    365                 DEBUG(4,("ntlm_password_check: Checking NTLMv2 password with uppercased version of domain [%s]\n", client_domain));
     371                DEBUG(4,("ntlm_password_check: Checking NTLMv2 password with uppercased version of domain [%s]\n",
     372                        upper_client_domain ? upper_client_domain : "<NULL>"));
    366373                if (smb_pwd_check_ntlmv2(mem_ctx,
    367374                                         nt_response,
    368375                                         stored_nt->hash, challenge,
    369376                                         client_username,
    370                                          client_domain,
    371                                          true,
     377                                         upper_client_domain,
    372378                                         user_sess_key)) {
    373379                        if (user_sess_key->length) {
     
    383389                                         client_username,
    384390                                         "",
    385                                          false,
    386391                                         user_sess_key)) {
    387392                        if (user_sess_key->length) {
     
    471476           - related to Win9X, legacy NAS pass-though authentication
    472477        */
    473         DEBUG(4,("ntlm_password_check: Checking LMv2 password with domain %s\n", client_domain));
     478        DEBUG(4,("ntlm_password_check: Checking LMv2 password with domain %s\n",
     479                client_domain ? client_domain : "<NULL>"));
    474480        if (smb_pwd_check_ntlmv2(mem_ctx,
    475481                                 lm_response,
     
    477483                                 client_username,
    478484                                 client_domain,
    479                                  false,
    480485                                 &tmp_sess_key)) {
    481486                if (nt_response->length > 24) {
     
    489494                                            client_username,
    490495                                            client_domain,
    491                                             false,
    492496                                            user_sess_key);
    493497                } else {
     
    501505        }
    502506
    503         DEBUG(4,("ntlm_password_check: Checking LMv2 password with upper-cased version of domain %s\n", client_domain));
     507        DEBUG(4,("ntlm_password_check: Checking LMv2 password with upper-cased version of domain %s\n",
     508                upper_client_domain ? upper_client_domain : "<NULL>"));
    504509        if (smb_pwd_check_ntlmv2(mem_ctx,
    505510                                 lm_response,
    506511                                 stored_nt->hash, challenge,
    507512                                 client_username,
    508                                  client_domain,
    509                                  true,
     513                                 upper_client_domain,
    510514                                 &tmp_sess_key)) {
    511515                if (nt_response->length > 24) {
     
    518522                                            stored_nt->hash, challenge,
    519523                                            client_username,
    520                                             client_domain,
    521                                             true,
     524                                            upper_client_domain,
    522525                                            user_sess_key);
    523526                } else {
     
    537540                                 client_username,
    538541                                 "",
    539                                  false,
    540542                                 &tmp_sess_key)) {
    541543                if (nt_response->length > 24) {
     
    549551                                            client_username,
    550552                                            "",
    551                                             false,
    552553                                            user_sess_key);
    553554                } else {
  • vendor/current/libcli/auth/ntlmssp_server.c

    r740 r746  
    360360        if (ntlmssp_state->neg_flags & NTLMSSP_NEGOTIATE_NTLM2) {
    361361                if (ntlmssp_state->nt_resp.length == 24 && ntlmssp_state->lm_resp.length == 24) {
    362                         struct MD5Context md5_session_nonce_ctx;
     362                        MD5_CTX md5_session_nonce_ctx;
    363363                        state->doing_ntlm2 = true;
    364364
  • vendor/current/libcli/auth/ntlmssp_sign.c

    r740 r746  
    5252                            const char *constant)
    5353{
    54         struct MD5Context ctx3;
     54        MD5_CTX ctx3;
    5555        MD5Init(&ctx3);
    5656        MD5Update(&ctx3, session_key.data, session_key.length);
  • vendor/current/libcli/auth/proto.h

    r740 r746  
    110110bool ntv2_owf_gen(const uint8_t owf[16],
    111111                  const char *user_in, const char *domain_in,
    112                   bool upper_case_domain, /* Transform the domain into UPPER case */
    113112                  uint8_t kr_buf[16]);
    114113void SMBOWFencrypt(const uint8_t passwd[16], const uint8_t *c8, uint8_t p24[24]);
  • vendor/current/libcli/auth/schannel_sign.c

    r740 r746  
    111111        uint8_t packet_digest[16];
    112112        static const uint8_t zeros[4];
    113         struct MD5Context ctx;
     113        MD5_CTX ctx;
    114114
    115115        MD5Init(&ctx);
  • vendor/current/libcli/auth/smbencrypt.c

    r740 r746  
    100100void E_md5hash(const uint8_t salt[16], const uint8_t nthash[16], uint8_t hash_out[16])
    101101{
    102         struct MD5Context tctx;
     102        MD5_CTX tctx;
    103103        MD5Init(&tctx);
    104104        MD5Update(&tctx, salt, 16);
     
    169169bool ntv2_owf_gen(const uint8_t owf[16],
    170170                  const char *user_in, const char *domain_in,
    171                   bool upper_case_domain, /* Transform the domain into UPPER case */
    172171                  uint8_t kr_buf[16])
    173172{
     
    197196                talloc_free(mem_ctx);
    198197                return false;
    199         }
    200 
    201         if (upper_case_domain) {
    202                 domain_in = strupper_talloc(mem_ctx, domain_in);
    203                 if (domain_in == NULL) {
    204                         talloc_free(mem_ctx);
    205                         return false;
    206                 }
    207198        }
    208199
     
    475466           This prevents username swapping during the auth exchange
    476467        */
    477         if (!ntv2_owf_gen(nt_hash, user, domain, true, ntlm_v2_hash)) {
     468        if (!ntv2_owf_gen(nt_hash, user, domain, ntlm_v2_hash)) {
    478469                return false;
    479470        }
     
    624615void encode_or_decode_arc4_passwd_buffer(unsigned char pw_buf[532], const DATA_BLOB *psession_key)
    625616{
    626         struct MD5Context tctx;
     617        MD5_CTX tctx;
    627618        unsigned char key_out[16];
    628619
     
    704695{
    705696        uint8_t buffer[516];
    706         struct MD5Context ctx;
     697        MD5_CTX ctx;
    707698        struct wkssvc_PasswordBuffer *my_pwd_buf = NULL;
    708699        DATA_BLOB confounded_session_key;
     
    742733{
    743734        uint8_t buffer[516];
    744         struct MD5Context ctx;
     735        MD5_CTX ctx;
    745736        size_t pwd_len;
    746737
Note: See TracChangeset for help on using the changeset viewer.