s3-auth: in make_user_info_for_reply_enc make sure to check length and data
authorGünther Deschner <gd@samba.org>
Wed, 16 Jun 2010 12:18:45 +0000 (14:18 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 16 Jun 2010 12:42:23 +0000 (14:42 +0200)
pointer of nt and lm hash.

This fixes kernel cifs client with sec=ntlmv2.

Guenther

source3/auth/auth_util.c

index a93d44fe91999be11441887dffeec7b86424d5dd..d8e838721ee1c758d2a40c7a08051cb06ac2e1fe 100644 (file)
@@ -358,8 +358,8 @@ NTSTATUS make_user_info_for_reply_enc(struct auth_usersupplied_info **user_info,
        return make_user_info_map(user_info, smb_name, 
                                  client_domain, 
                                  get_remote_machine_name(), 
-                                 lm_resp.data ? &lm_resp : NULL, 
-                                 nt_resp.data ? &nt_resp : NULL, 
+                                 lm_resp.data && (lm_resp.length > 0) ? &lm_resp : NULL,
+                                 nt_resp.data && (nt_resp.length > 0) ? &nt_resp : NULL,
                                  NULL, NULL, NULL,
                                  True);
 }