From patchwork Tue Aug 3 14:20:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 116783 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 o73ELBEe005277 for ; Tue, 3 Aug 2010 14:21:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756728Ab0HCOVp (ORCPT ); Tue, 3 Aug 2010 10:21:45 -0400 Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.121]:47852 "EHLO cdptpa-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756386Ab0HCOVo (ORCPT ); Tue, 3 Aug 2010 10:21:44 -0400 X-Authority-Analysis: v=1.1 cv=8Ouyix1mjDiY39+WXI3mGP2cYJJcyvuZWGfIWBrWPVc= c=1 sm=0 a=AnmVPni7TgUA:10 a=ld/erqUjW76FpBUqCqkKeA==:17 a=mJjC6ScEAAAA:8 a=20KFwNOVAAAA:8 a=myfoLwqMnDPEraDnROwA:9 a=xudrEgXg0E0hhHJx1pGY02gNW9sA:4 a=2NEUOfxDfW4A:10 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:53632] helo=mail.poochiereds.net) by cdptpa-oedge02.mail.rr.com (envelope-from ) (ecelerity 2.2.2.39 r()) with ESMTP id 99/76-27492-9B5285C4; Tue, 03 Aug 2010 14:20:42 +0000 Received: by mail.poochiereds.net (Postfix, from userid 4447) id 623DA58136; Tue, 3 Aug 2010 10:20:41 -0400 (EDT) From: Jeff Layton To: smfrench@gmail.com Cc: linux-cifs@vger.kernel.org, bfields@fieldses.org Subject: [PATCH] cifs: account for new creduid=0x%x parameter in spnego upcall string Date: Tue, 3 Aug 2010 10:20:41 -0400 Message-Id: <1280845241-12305-1-git-send-email-jlayton@redhat.com> X-Mailer: git-send-email 1.7.2 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]); Tue, 03 Aug 2010 14:21:45 +0000 (UTC) diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c index 6effccf..8704490 100644 --- a/fs/cifs/cifs_spnego.c +++ b/fs/cifs/cifs_spnego.c @@ -84,6 +84,9 @@ struct key_type cifs_spnego_key_type = { /* strlen of ";uid=0x" */ #define UID_KEY_LEN 7 +/* strlen of ";creduid=0x" */ +#define CREDUID_KEY_LEN 11 + /* strlen of ";user=" */ #define USER_KEY_LEN 6 @@ -107,6 +110,7 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo) IP_KEY_LEN + INET6_ADDRSTRLEN + MAX_MECH_STR_LEN + UID_KEY_LEN + (sizeof(uid_t) * 2) + + CREDUID_KEY_LEN + (sizeof(uid_t) * 2) + USER_KEY_LEN + strlen(sesInfo->userName) + PID_KEY_LEN + (sizeof(pid_t) * 2) + 1;