From patchwork Thu Apr 21 06:24:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Guntsche X-Patchwork-Id: 723971 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3L6OsrR028683 for ; Thu, 21 Apr 2011 06:24:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751363Ab1DUGYu (ORCPT ); Thu, 21 Apr 2011 02:24:50 -0400 Received: from lvps87-230-0-242.dedicated.hosteurope.de ([87.230.0.242]:47134 "EHLO lvps87-230-0-242.dedicated.hosteurope.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751248Ab1DUGYt (ORCPT ); Thu, 21 Apr 2011 02:24:49 -0400 Received: (qmail 19647 invoked from network); 21 Apr 2011 08:24:47 +0200 Received: from 91-118-56-185.dynamic.adsl-line.inode.at (HELO gibson.comsick.at) (91.118.56.185) by lvps87-230-0-242.dedicated.hosteurope.de with (DHE-RSA-AES128-SHA encrypted) SMTP; 21 Apr 2011 08:24:47 +0200 Date: Thu, 21 Apr 2011 08:24:39 +0200 From: Michael Guntsche To: "J. Bruce Fields" Cc: "linux-nfs@vger.kernel.org" , kwc@umich.edu Subject: Re: [BUG] supported_krb5_enctypes not available if GSS support compiled as a module Message-ID: <20110421082106@it-loops.com> References: <20110420224241@it-loops.com> <20110420213906.GB24503@pad.home.fieldses.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110420213906.GB24503@pad.home.fieldses.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 21 Apr 2011 06:24:55 +0000 (UTC) On 20 Apr 11 17:39, J. Bruce Fields wrote: > On Wed, Apr 20, 2011 at 10:49:51PM +0200, Michael Guntsche wrote: > > Hello Bruce, > > > > Commit 0a5e5f122c nfsd: fix compile error fixed a compile error by > > putting the code between an #ifdef CONFIG_SUNRPC_GSS. > > > > In my case this is compiled as a module so CONFIG_SUNRPC_GSS_MODULE is > > defined but not CONFIG_SUNRPC_GSS. I do not know if this was on purpose > > but as it is now "supported_krb5_enctypes" is only available if GSS > > support is compiled in the kernel. > > Ugh, fuzzy thinking on my part. > > So I guess to do this right we want modules to be able to dynamically > add files to the nfsd filesystem at module load time? Good morning, A little bit more sleep and taking a look at other modules I came up with the following patch which looks ok for me. I think you find a better wording for this commit though. diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 1f5eae4..33660ca 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -189,7 +189,7 @@ static struct file_operations export_features_operations = { .release = single_release, }; -#ifdef CONFIG_SUNRPC_GSS +#if defined(CONFIG_SUNRPC_GSS) || defined(CONFIG_SUNRPC_GSS_MODULE) static int supported_enctypes_show(struct seq_file *m, void *v) { struct gss_api_mech *k5mech; @@ -1427,7 +1427,7 @@ static int nfsd_fill_super(struct super_block * sb, void * data, int silent) [NFSD_Versions] = {"versions", &transaction_ops, S_IWUSR|S_IRUSR}, [NFSD_Ports] = {"portlist", &transaction_ops, S_IWUSR|S_IRUGO}, [NFSD_MaxBlkSize] = {"max_block_size", &transaction_ops, S_IWUSR|S_IRUGO}, -#ifdef CONFIG_SUNRPC_GSS +#if defined(CONFIG_SUNRPC_GSS) || defined(CONFIG_SUNRPC_GSS_MODULE) [NFSD_SupportedEnctypes] = {"supported_krb5_enctypes", &supported_enctypes_ops, S_IRUGO}, #endif /* CONFIG_SUNRPC_GSS */ #ifdef CONFIG_NFSD_V4