lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 2 Dec 2016 11:55:40 -0800
From:   Dan Williams <dan.j.williams@...el.com>
To:     Fabian Frederick <fabf@...net.be>
Cc:     "linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 6/8 linux-next] libnvdimm, namespace: use octal for permissions

On Fri, Dec 2, 2016 at 11:21 AM, Fabian Frederick <fabf@...net.be> wrote:
> According to commit f90774e1fd27
> ("checkpatch: look for symbolic permissions and suggest octal instead")
>
> Signed-off-by: Fabian Frederick <fabf@...net.be>
> ---
>  drivers/nvdimm/namespace_devs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c
> index b00045b..0d2da9a 100644
> --- a/drivers/nvdimm/namespace_devs.c
> +++ b/drivers/nvdimm/namespace_devs.c
> @@ -1132,7 +1132,7 @@ static ssize_t size_show(struct device *dev,
>         return sprintf(buf, "%llu\n", (unsigned long long)
>                         nvdimm_namespace_capacity(to_ndns(dev)));
>  }
> -static DEVICE_ATTR(size, S_IRUGO, size_show, size_store);
> +static DEVICE_ATTR(size, 0444, size_show, size_store);
>
>  static u8 *namespace_to_uuid(struct device *dev)
>  {
> @@ -1456,7 +1456,7 @@ static umode_t namespace_visible(struct kobject *kobj,
>
>         if (is_namespace_pmem(dev) || is_namespace_blk(dev)) {
>                 if (a == &dev_attr_size.attr)
> -                       return S_IWUSR | S_IRUGO;
> +                       return 0200 | 0444;

If we're going to use octal just go to "0644" directly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ