From patchwork Mon Aug 23 15:38:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 124521 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7NFbQj1012698 for ; Mon, 23 Aug 2010 15:38:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754104Ab0HWPiH (ORCPT ); Mon, 23 Aug 2010 11:38:07 -0400 Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.120]:62910 "EHLO cdptpa-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751523Ab0HWPiG (ORCPT ); Mon, 23 Aug 2010 11:38:06 -0400 X-Authority-Analysis: v=1.1 cv=ND68juEMuNdXz64+ywFdFni4U2KLqWwWKyn0dKsYuqk= c=1 sm=0 a=WURR1V7nmesA:10 a=ld/erqUjW76FpBUqCqkKeA==:17 a=20KFwNOVAAAA:8 a=FCW9kcvPevO3IZ1CDFgA:9 a=Ycitg7bKTZP-I03GvRnQXHUl69UA:4 a=jEp0ucaQiEUA:10 a=ld/erqUjW76FpBUqCqkKeA==:117 X-Cloudmark-Score: 0 X-Originating-IP: 71.70.153.3 Received: from [71.70.153.3] ([71.70.153.3:39294] helo=mail.poochiereds.net) by cdptpa-oedge02.mail.rr.com (envelope-from ) (ecelerity 2.2.2.39 r()) with ESMTP id 99/2B-19911-CD5927C4; Mon, 23 Aug 2010 15:38:05 +0000 Received: by mail.poochiereds.net (Postfix, from userid 4447) id A4C2658149; Mon, 23 Aug 2010 11:38:04 -0400 (EDT) From: Jeff Layton To: smfrench@gmail.com Cc: linux-cifs@vger.kernel.org Subject: [PATCH] cifs: check for NULL session password Date: Mon, 23 Aug 2010 11:38:04 -0400 Message-Id: <1282577884-16564-1-git-send-email-jlayton@redhat.com> X-Mailer: git-send-email 1.7.2.1 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 23 Aug 2010 15:38:15 +0000 (UTC) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 18af707..ec0ea4a 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -1673,6 +1673,7 @@ cifs_find_smb_ses(struct TCP_Server_Info *server, struct smb_vol *vol) MAX_USERNAME_SIZE)) continue; if (strlen(vol->username) != 0 && + ses->password != NULL && strncmp(ses->password, vol->password ? vol->password : "", MAX_PASSWORD_SIZE))