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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 24 Jan 2017 22:22:08 +0000
From:   "Dilger, Andreas" <andreas.dilger@...el.com>
To:     Ernestas Kulik <ernestas.kulik@...il.com>
CC:     "Drokin, Oleg" <oleg.drokin@...el.com>,
        James Simmons <jsimmons@...radead.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "lustre-devel@...ts.lustre.org" <lustre-devel@...ts.lustre.org>,
        "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] staging: lustre: libcfs: use octal permissions

On Jan 24, 2017, at 09:40, Ernestas Kulik <ernestas.kulik@...il.com> wrote:
> 
> Using octal permissions instead of symbolic ones is preferred.

Typically the reverse is true - using symbolic constants is preferred over numeric ones.
Where does this recommendation come from?

Cheers, Andreas

> Signed-off-by: Ernestas Kulik <ernestas.kulik@...il.com>
> ---
> drivers/staging/lustre/lnet/libcfs/module.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lnet/libcfs/module.c b/drivers/staging/lustre/lnet/libcfs/module.c
> index 161e04226521..c388550c2d10 100644
> --- a/drivers/staging/lustre/lnet/libcfs/module.c
> +++ b/drivers/staging/lustre/lnet/libcfs/module.c
> @@ -488,10 +488,10 @@ static const struct file_operations lnet_debugfs_file_operations_wo = {
> 
> static const struct file_operations *lnet_debugfs_fops_select(umode_t mode)
> {
> -	if (!(mode & S_IWUGO))
> +	if (!(mode & 0222))
> 		return &lnet_debugfs_file_operations_ro;
> 
> -	if (!(mode & S_IRUGO))
> +	if (!(mode & 0444))
> 		return &lnet_debugfs_file_operations_wo;
> 
> 	return &lnet_debugfs_file_operations_rw;
> -- 
> 2.11.0
> 







Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ