* [BUG] supported_krb5_enctypes not available if GSS support compiled as a module @ 2011-04-20 20:49 Michael Guntsche 2011-04-20 21:39 ` J. Bruce Fields 0 siblings, 1 reply; 4+ messages in thread From: Michael Guntsche @ 2011-04-20 20:49 UTC (permalink / raw) To: J. Bruce Fields; +Cc: linux-nfs@vger.kernel.org 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. Kind regards, Michael ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] supported_krb5_enctypes not available if GSS support compiled as a module 2011-04-20 20:49 [BUG] supported_krb5_enctypes not available if GSS support compiled as a module Michael Guntsche @ 2011-04-20 21:39 ` J. Bruce Fields 2011-04-20 21:59 ` Michael Guntsche 2011-04-21 6:24 ` Michael Guntsche 0 siblings, 2 replies; 4+ messages in thread From: J. Bruce Fields @ 2011-04-20 21:39 UTC (permalink / raw) To: Michael Guntsche; +Cc: linux-nfs@vger.kernel.org, kwc 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? --b. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] supported_krb5_enctypes not available if GSS support compiled as a module 2011-04-20 21:39 ` J. Bruce Fields @ 2011-04-20 21:59 ` Michael Guntsche 2011-04-21 6:24 ` Michael Guntsche 1 sibling, 0 replies; 4+ messages in thread From: Michael Guntsche @ 2011-04-20 21:59 UTC (permalink / raw) To: J. Bruce Fields; +Cc: linux-nfs@vger.kernel.org, kwc 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? This seems to be working already. The problem is that CONFIG_SUNRPC_GSS is not defined when configured as a module so the code is not being built in the first place. I tested this by defining CONFIG_SUNRPC_GSS at the beginning of the file. Of course you can test for both CONFIG_SUNRPC_GSS AND *GSS_MODULE but I do not know if this is the correct way. /Michael ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] supported_krb5_enctypes not available if GSS support compiled as a module 2011-04-20 21:39 ` J. Bruce Fields 2011-04-20 21:59 ` Michael Guntsche @ 2011-04-21 6:24 ` Michael Guntsche 1 sibling, 0 replies; 4+ messages in thread From: Michael Guntsche @ 2011-04-21 6:24 UTC (permalink / raw) To: J. Bruce Fields; +Cc: linux-nfs@vger.kernel.org, kwc 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. ___________________________________ Fix supported_krb5_enctypes proc entry when compiled as module The GSS module can also be compiled as a module so check for this configuration as well. 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-21 6:24 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-04-20 20:49 [BUG] supported_krb5_enctypes not available if GSS support compiled as a module Michael Guntsche 2011-04-20 21:39 ` J. Bruce Fields 2011-04-20 21:59 ` Michael Guntsche 2011-04-21 6:24 ` Michael Guntsche
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox