From patchwork Wed May 10 04:18:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Kent X-Patchwork-Id: 9719221 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0C642601E7 for ; Wed, 10 May 2017 04:19:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2DE728552 for ; Wed, 10 May 2017 04:19:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7B0028558; Wed, 10 May 2017 04:19:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F46828552 for ; Wed, 10 May 2017 04:19:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751547AbdEJESo (ORCPT ); Wed, 10 May 2017 00:18:44 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:51451 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751429AbdEJESm (ORCPT ); Wed, 10 May 2017 00:18:42 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id F112F20BA7; Wed, 10 May 2017 00:18:41 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 10 May 2017 00:18:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=themaw.net; h=cc :content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=SxaeToHrRQ3IUdzNG0yqtc+BaiBWrHEQb2HhD17T/ FA=; b=d7TqmR6RoDxwWo5Zz11jdkNeyIHyGOHz3h2kDGFyYkOBfH3XCDDEeNE7H zYKsE/8bfp/75AmdabSrFbNzGrba/uZ0Q9EDcncjAZxRdFZ12ekupwlut7pSE82i pb1p0hSRbbpaASS8Cp6NaI0OqOVjzDmzzauApM2IQu4hKR8OFbhnNq9RXKdwzjoP /ApqNh3dZ2u3WPZ1jb0jzSmJykiknEqC4yHOL27NrTIJjubBB3De9BYpnXd16WA3 pPuAkNYM+uDWQe+4LJZkjJ0VxBkx7SEnmnPI/ZgUqjG+aGYH/RdTj6K9zD2EpUxi AEP5pQixbCj+nKoDD6smgoDDgnGrQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=SxaeToHrRQ3IUdzNG0 yqtc+BaiBWrHEQb2HhD17T/FA=; b=Ij7g4V2rXxgKIwfeF91Y41xed2uhHD5XML SO6kb/5K80HE5bazSRE4hlyLbwc/xk5bs9llAyEhTYRyj4Er702liwkFI1g+TpN8 RHh61XoqpgaD+0Ta1GAcd0Eo1at4VML7yIRH0VKopdDd2EgwMmhRHpE2teodY3eo tT7AymnCg7GJx+fC7QWLg7SSSwPO/JSITNiQ1jlY566eFVxv8HNHpTcozlS8MQA/ BJtR/jToEs2AsYfPajJNs7fxX7Jf2ZIdHocq8q7G7oZ/WpvQX1owgU92GVDpKmKN VVakCPF2RqdgSu97QMB0ymJqKoqFRVo88nevGJHlyBNJthpJjMcw== X-ME-Sender: X-Sasl-enc: 6PE18hqtYc8LIMnNDEAykvEy0bdbs7ccUc5hcECNpfTv 1494389921 Received: from pluto.themaw.net (220-253-147-189.dyn.iinet.net.au [220.253.147.189]) by mail.messagingengine.com (Postfix) with ESMTPA id 62A347E86A; Wed, 10 May 2017 00:18:41 -0400 (EDT) Received: from pluto.themaw.net (localhost [127.0.0.1]) by pluto.themaw.net (Postfix) with ESMTP id 52B5FA00C2; Wed, 10 May 2017 12:18:38 +0800 (AWST) Subject: [PATCH 1/3] autofs - make disc device user accessible From: Ian Kent To: Al Viro Cc: Colin Walters , Ondrej Holy , autofs mailing list , Kernel Mailing List , David Howells , linux-fsdevel Date: Wed, 10 May 2017 12:18:38 +0800 Message-ID: <149438991819.26550.11290804420751932707.stgit@pluto.themaw.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: stable@vger.kernel.org --- 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 734cbf8..9b58d6e 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 = 0666 }; MODULE_ALIAS_MISCDEV(AUTOFS_MINOR);