~ubuntu-branches/ubuntu/oneiric/openvpn/oneiric

« back to all changes in this revision

Viewing changes to ntlm.c

  • Committer: Bazaar Package Importer
  • Author(s): Thierry Carrez
  • Date: 2008-10-07 16:30:44 UTC
  • mfrom: (1.1.11 upstream) (10.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20081007163044-ixx04wg588z1972e
Tags: 2.1~rc11-1ubuntu1
* Merge with Debian (LP: #279655), remaining diffs:
  - debian/openvpn.init.d: Added 'status' action to init script, show
    per-VPN result messages and add "--script-security 2" by default for
    backwards compatibility
  - debian/control: Added lsb-base>=3.2-14 depend to allow status_of_proc()
* Fixes regression when calling commands with arguments (LP: #277447)

Show diffs side-by-side

added added

removed removed

Lines of Context:
256
256
  }
257
257
 
258
258
        if (ntlmv2_enabled){ /* Generate NTLMv2 response */
259
 
                
 
259
                int tib_len;
 
260
 
260
261
                /* NTLMv2 hash */
261
262
                my_strupr((unsigned char *)strcpy(userdomain, username));
262
263
                if (strlen(username) + strlen(domain) < sizeof(userdomain))
276
277
                ntlmv2_blob[0x18]=0;                        /* Unknown, zero should work */
277
278
 
278
279
                /* Add target information block to the blob */
279
 
                int tib_len;
280
280
                if (( *((long *)&buf2[0x14]) & 0x00800000) == 0x00800000){ /* Check for Target Information block */
281
281
                        tib_len = buf2[0x28];/* Get Target Information block size */
282
282
                        if (tib_len > 96) tib_len = 96;
283
 
                        char *tib_ptr = buf2 + buf2[0x2c]; /* Get Target Information block pointer */
284
 
                        memcpy(&ntlmv2_blob[0x1c], tib_ptr, tib_len); /* Copy Target Information block into the blob */
 
283
                        {
 
284
                          char *tib_ptr = buf2 + buf2[0x2c]; /* Get Target Information block pointer */
 
285
                          memcpy(&ntlmv2_blob[0x1c], tib_ptr, tib_len); /* Copy Target Information block into the blob */
 
286
                        }
285
287
                } else {
286
288
                        tib_len = 0;
287
289
                }