linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cifs: fix build by selecting CONFIG_KEYS
@ 2019-07-01  3:03 Sergey Senozhatsky
  2019-07-01 21:04 ` Steve French
  0 siblings, 1 reply; 3+ messages in thread
From: Sergey Senozhatsky @ 2019-07-01  3:03 UTC (permalink / raw)
  To: Steve French
  Cc: linux-cifs, samba-technical, linux-kernel, Sergey Senozhatsky

CONFIG_CIFS_ACL had a dependency "depends on KEYS" which was
dropped with the removal of CONFIG_CIFS_ACL. This breaks the
build on systems which don't have CONFIG_KEYS in .config:

cifsacl.c:37:15: error: variable ‘cifs_idmap_key_acl’ has
                 initializer but incomplete type
   37 | static struct key_acl cifs_idmap_key_acl = {
      |               ^~~~~~~
cifsacl.c:38:3: error: ‘struct key_acl’ has no member
                named ‘usage’
   38 |  .usage = REFCOUNT_INIT(1),
      |   ^~~~~
[..]

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
 fs/cifs/Kconfig   | 1 +
 fs/cifs/cifsacl.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/fs/cifs/Kconfig b/fs/cifs/Kconfig
index 3eee73449bdd..5912751e6f09 100644
--- a/fs/cifs/Kconfig
+++ b/fs/cifs/Kconfig
@@ -17,6 +17,7 @@ config CIFS
 	select CRYPTO_ECB
 	select CRYPTO_AES
 	select CRYPTO_DES
+	select KEYS
 	help
 	  This is the client VFS module for the SMB3 family of NAS protocols,
 	  (including support for the most recent, most secure dialect SMB3.1.1)
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
index 78eed72f3af0..8ca479caf902 100644
--- a/fs/cifs/cifsacl.c
+++ b/fs/cifs/cifsacl.c
@@ -24,6 +24,7 @@
 #include <linux/fs.h>
 #include <linux/slab.h>
 #include <linux/string.h>
+#include <linux/key.h>
 #include <linux/keyctl.h>
 #include <linux/key-type.h>
 #include <keys/user-type.h>
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] cifs: fix build by selecting CONFIG_KEYS
  2019-07-01  3:03 [PATCH] cifs: fix build by selecting CONFIG_KEYS Sergey Senozhatsky
@ 2019-07-01 21:04 ` Steve French
  2019-07-02  1:29   ` Sergey Senozhatsky
  0 siblings, 1 reply; 3+ messages in thread
From: Steve French @ 2019-07-01 21:04 UTC (permalink / raw)
  To: Sergey Senozhatsky
  Cc: Steve French, CIFS, samba-technical, LKML, Sergey Senozhatsky

[-- Attachment #1: Type: text/plain, Size: 1805 bytes --]

I had already merged the attached (similar) fix into cifs-2.6.git for-next


On Sun, Jun 30, 2019 at 10:24 PM Sergey Senozhatsky
<sergey.senozhatsky.work@gmail.com> wrote:
>
> CONFIG_CIFS_ACL had a dependency "depends on KEYS" which was
> dropped with the removal of CONFIG_CIFS_ACL. This breaks the
> build on systems which don't have CONFIG_KEYS in .config:
>
> cifsacl.c:37:15: error: variable ‘cifs_idmap_key_acl’ has
>                  initializer but incomplete type
>    37 | static struct key_acl cifs_idmap_key_acl = {
>       |               ^~~~~~~
> cifsacl.c:38:3: error: ‘struct key_acl’ has no member
>                 named ‘usage’
>    38 |  .usage = REFCOUNT_INIT(1),
>       |   ^~~~~
> [..]
>
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> ---
>  fs/cifs/Kconfig   | 1 +
>  fs/cifs/cifsacl.c | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/fs/cifs/Kconfig b/fs/cifs/Kconfig
> index 3eee73449bdd..5912751e6f09 100644
> --- a/fs/cifs/Kconfig
> +++ b/fs/cifs/Kconfig
> @@ -17,6 +17,7 @@ config CIFS
>         select CRYPTO_ECB
>         select CRYPTO_AES
>         select CRYPTO_DES
> +       select KEYS
>         help
>           This is the client VFS module for the SMB3 family of NAS protocols,
>           (including support for the most recent, most secure dialect SMB3.1.1)
> diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
> index 78eed72f3af0..8ca479caf902 100644
> --- a/fs/cifs/cifsacl.c
> +++ b/fs/cifs/cifsacl.c
> @@ -24,6 +24,7 @@
>  #include <linux/fs.h>
>  #include <linux/slab.h>
>  #include <linux/string.h>
> +#include <linux/key.h>
>  #include <linux/keyctl.h>
>  #include <linux/key-type.h>
>  #include <keys/user-type.h>
> --
> 2.22.0
>


-- 
Thanks,

Steve

[-- Attachment #2: 0001-CIFS-Fix-module-dependency.patch --]
[-- Type: text/x-patch, Size: 1323 bytes --]

From 275e35152e713cb186338bd257139ed28d498726 Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Sun, 30 Jun 2019 18:00:41 -0500
Subject: [PATCH] CIFS: Fix module dependency

KEYS is required not that CONFIG_CIFS_ACL is always on
and the ifdef for it removed.

Signed-off-by: Steve French <stfrench@microsoft.com>
---
 fs/cifs/Kconfig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/cifs/Kconfig b/fs/cifs/Kconfig
index cb3096fabbbe..e39c15267bb4 100644
--- a/fs/cifs/Kconfig
+++ b/fs/cifs/Kconfig
@@ -17,6 +17,7 @@ config CIFS
 	select CRYPTO_ECB
 	select CRYPTO_AES
 	select CRYPTO_DES
+	select KEYS
 	help
 	  This is the client VFS module for the SMB3 family of NAS protocols,
 	  (including support for the most recent, most secure dialect SMB3.1.1)
@@ -110,7 +111,7 @@ config CIFS_WEAK_PW_HASH
 
 config CIFS_UPCALL
 	bool "Kerberos/SPNEGO advanced session setup"
-	depends on CIFS && KEYS
+	depends on CIFS
 	select DNS_RESOLVER
 	help
 	  Enables an upcall mechanism for CIFS which accesses userspace helper
@@ -177,7 +178,7 @@ config CIFS_DEBUG_DUMP_KEYS
 
 config CIFS_DFS_UPCALL
 	bool "DFS feature support"
-	depends on CIFS && KEYS
+	depends on CIFS
 	select DNS_RESOLVER
 	help
 	  Distributed File System (DFS) support is used to access shares
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] cifs: fix build by selecting CONFIG_KEYS
  2019-07-01 21:04 ` Steve French
@ 2019-07-02  1:29   ` Sergey Senozhatsky
  0 siblings, 0 replies; 3+ messages in thread
From: Sergey Senozhatsky @ 2019-07-02  1:29 UTC (permalink / raw)
  To: Steve French
  Cc: Sergey Senozhatsky, Steve French, CIFS, samba-technical, LKML,
	Sergey Senozhatsky

On (07/01/19 16:04), Steve French wrote:
> 
> I had already merged the attached (similar) fix into cifs-2.6.git for-next

Yup, just got it with linux-next 20190701.

	-ss

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-02  1:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-01  3:03 [PATCH] cifs: fix build by selecting CONFIG_KEYS Sergey Senozhatsky
2019-07-01 21:04 ` Steve French
2019-07-02  1:29   ` Sergey Senozhatsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).