From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752062AbdHHEgR (ORCPT ); Tue, 8 Aug 2017 00:36:17 -0400 Received: from icp-osb-irony-out3.external.iinet.net.au ([203.59.1.153]:63891 "EHLO icp-osb-irony-out3.external.iinet.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751974AbdHHEgO (ORCPT ); Tue, 8 Aug 2017 00:36:14 -0400 X-Greylist: delayed 555 seconds by postgrey-1.27 at vger.kernel.org; Tue, 08 Aug 2017 00:36:11 EDT X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2AWAgD0PIlZ/3GhBzpcHAEBBAEBCgEBg1qBeI4PkAc5AQEBAQEGgQgzlgSCEhyFKwKEXD8YAQIBAQEBAQEBayiFGQYjVhAYAQwCGA4CAkcQBhOKIgysEYImIgKLPQEBCCiBC4IdggKBBYJghy+DSIJhBZB0gQ2ODYsliRCLV4Z2lgkfOIEKUy8Kh3AzNocjgkEBAQE X-IPAS-Result: A2AWAgD0PIlZ/3GhBzpcHAEBBAEBCgEBg1qBeI4PkAc5AQEBAQEGgQgzlgSCEhyFKwKEXD8YAQIBAQEBAQEBayiFGQYjVhAYAQwCGA4CAkcQBhOKIgysEYImIgKLPQEBCCiBC4IdggKBBYJghy+DSIJhBZB0gQ2ODYsliRCLV4Z2lgkfOIEKUy8Kh3AzNocjgkEBAQE X-IronPort-AV: E=Sophos;i="5.41,341,1498492800"; d="scan'208";a="411532776" Subject: [PATCH 2/3] autofs - make disc device user accessible From: Ian Kent To: Andrew Morton Cc: autofs mailing list , Ondrej Holy , Colin Walters , Kernel Mailing List , David Howells , linux-fsdevel Date: Tue, 08 Aug 2017 12:26:59 +0800 Message-ID: <150216641928.11652.7388977863125547969.stgit@pluto.themaw.net> In-Reply-To: <150216641255.11652.4204561328197919771.stgit@pluto.themaw.net> References: <150216641255.11652.4204561328197919771.stgit@pluto.themaw.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The autofs miscellanous device ioctls that shouldn't require CAP_SYS_ADMIN need to be accessible to user space applications in order to be able to get information about autofs mounts. The module checks capabilities so the miscelaneous device should be fine with broad permissions. Signed-off-by: Ian Kent Cc: Colin Walters Cc: Ondrej Holy --- fs/autofs4/dev-ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index dd9f1bebb5a3..218a4ecc75cc 100644 --- a/fs/autofs4/dev-ioctl.c +++ b/fs/autofs4/dev-ioctl.c @@ -733,7 +733,8 @@ static const struct file_operations _dev_ioctl_fops = { static struct miscdevice _autofs_dev_ioctl_misc = { .minor = AUTOFS_MINOR, .name = AUTOFS_DEVICE_NAME, - .fops = &_dev_ioctl_fops + .fops = &_dev_ioctl_fops, + .mode = 0644, }; MODULE_ALIAS_MISCDEV(AUTOFS_MINOR); From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Kent Subject: [PATCH 2/3] autofs - make disc device user accessible Date: Tue, 08 Aug 2017 12:26:59 +0800 Message-ID: <150216641928.11652.7388977863125547969.stgit@pluto.themaw.net> References: <150216641255.11652.4204561328197919771.stgit@pluto.themaw.net> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <150216641255.11652.4204561328197919771.stgit@pluto.themaw.net> Sender: autofs-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Andrew Morton Cc: autofs mailing list , Ondrej Holy , Colin Walters , Kernel Mailing List , David Howells , linux-fsdevel The autofs miscellanous device ioctls that shouldn't require CAP_SYS_ADMIN need to be accessible to user space applications in order to be able to get information about autofs mounts. The module checks capabilities so the miscelaneous device should be fine with broad permissions. Signed-off-by: Ian Kent Cc: Colin Walters Cc: Ondrej Holy --- fs/autofs4/dev-ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index dd9f1bebb5a3..218a4ecc75cc 100644 --- a/fs/autofs4/dev-ioctl.c +++ b/fs/autofs4/dev-ioctl.c @@ -733,7 +733,8 @@ static const struct file_operations _dev_ioctl_fops = { static struct miscdevice _autofs_dev_ioctl_misc = { .minor = AUTOFS_MINOR, .name = AUTOFS_DEVICE_NAME, - .fops = &_dev_ioctl_fops + .fops = &_dev_ioctl_fops, + .mode = 0644, }; MODULE_ALIAS_MISCDEV(AUTOFS_MINOR); -- To unsubscribe from this list: send the line "unsubscribe autofs" in