]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/cifs/sess.c
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
[linux-2.6-omap-h63xx.git] / fs / cifs / sess.c
index 9ce628df29b420755aa88458ec6fbda7e8b6246a..70e32a81c213e0267dd3fc76a3d83f479e493c5f 100644 (file)
@@ -33,8 +33,6 @@
 extern void SMBNTencrypt(unsigned char *passwd, unsigned char *c8,
                          unsigned char *p24);
 
-#ifdef CONFIG_CIFS_EXPERIMENTAL
-
 static __u32 cifs_ssetup_hdr(struct cifsSesInfo *ses, SESSION_SETUP_ANDX *pSMB)
 {
        __u32 capabilities = 0;
@@ -319,7 +317,7 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
        __u32 capabilities;
        int count;
        int resp_buf_type = 0;
-       struct kvec iov[1];
+       struct kvec iov[2];  /* BB split variable length info into 2nd iovec */
        enum securityEnum type;
        __u16 action;
        int bytes_remaining;
@@ -411,8 +409,8 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
                else
                        ascii_ssetup_strings(&bcc_ptr, ses, nls_cp);
        } else if (type == NTLMv2) {
-               char * v2_sess_key = kmalloc(sizeof(struct ntlmv2_resp),
-                                               GFP_KERNEL);
+               char * v2_sess_key = 
+                       kmalloc(sizeof(struct ntlmv2_resp), GFP_KERNEL);
 
                /* BB FIXME change all users of v2_sess_key to
                   struct ntlmv2_resp */
@@ -432,7 +430,7 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
                        cpu_to_le16(sizeof(struct ntlmv2_resp));
 
                /* calculate session key */
-               CalcNTLMv2_response(ses, v2_sess_key);
+               setup_ntlmv2_rsp(ses, v2_sess_key, nls_cp);
                if(first_time) /* should this be moved into common code
                                  with similar ntlmv2 path? */
                /*   cifs_calculate_ntlmv2_mac_key(ses->server->mac_signing_key,
@@ -489,7 +487,7 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
        }
        action = le16_to_cpu(pSMB->resp.Action);
        if (action & GUEST_LOGIN)
-               cFYI(1, (" Guest login")); /* BB mark SesInfo struct? */
+               cFYI(1, ("Guest login")); /* BB mark SesInfo struct? */
        ses->Suid = smb_buf->Uid;   /* UID left in wire format (le) */
        cFYI(1, ("UID = %d ", ses->Suid));
        /* response can have either 3 or 4 word count - Samba sends 3 */
@@ -525,4 +523,3 @@ ssetup_exit:
 
        return rc;
 }
-#endif /* CONFIG_CIFS_EXPERIMENTAL */